ASP.net 4.0 default.aspx problem on IIS6

Dimonina picture Dimonina · Apr 14, 2010 · Viewed 18.2k times · Source

I installed .net framework 4 on my windows 2003 enterprise x64, wrote simple asp.net 4.0 application (default.aspx page only). The application works great if request is to default.aspx, not to the root site:

contoso.com/ - doesn't work (Get 404 error)

contoso.com/default.aspx - works.

Default.aspx is in list of default documents in IIS. Please help.

Answer

Will WM picture Will WM · Jun 16, 2010

Found a fix in a seemingly unrelated location - try setting the "EnableExtensionlessUrls" registry key to 0:

ASP.NET 4 Breaking Changes -> ASP.NET 2.0 Applications Might Generate HttpException Errors that Reference eurl.axd:

In the Windows registry, open the following node: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0

  1. Create a new DWORD value named EnableExtensionlessUrls.
  2. Set EnableExtensionlessUrls to 0. This enables extensionless URL behavior.
  3. Save the registry value and close the registry editor.
  4. Run the iisreset command-line tool, which causes IIS to read the new registry value.