воскресенье, 30 августа 2009 г.

Deploying ASP.NET MVC Application Under IIS6

When deploying an ASP.NET MVC application under Windows Server 2003 and IIS6 (and Windows Server 2008 Classic Mode), you’ll get 404 page not found error on every page, except the index of the site. This is because IIS6 doesn’t not support routing.

There are many solutions to fix this, I’ll just explain my favorite, which is extension-less url.

So lets show IIS6 how to handle extension-less URL. For this, we’ll use the Wildcard Mapping feature.

  • Open Internet Information Services (IIS) Manager. (run inetmgr)
  • Right Click » Properties on your website.
    1
  • Open the Home Directory tab.
  • Click on the Configuration button.
  • Open the Mappings tab of the Application Configuration window.2
  • In the Wildcard application maps section, click on the Insert button.
  • Browse to %windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll.
  • uncheck “Verify that file exists”.
    3
  • That’s it! Now try your ASP.NET MVC Application it should work nicely!

Комментариев нет: