Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.net 4.0 default.aspx problem on IIS6

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.

like image 324
Dimonina Avatar asked Apr 14 '10 06:04

Dimonina


People also ask

How do I know if ASP Net is registered with IIS?

ASP.NET Version 4.5 is required. To check that ASP.NET is installed and registered with the correct version, enter the command aspnet_regiis.exe -lv at the command prompt. Version 4.5 should be displayed for ASP.NET.


1 Answers

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.
like image 147
Will WM Avatar answered Oct 16 '22 15:10

Will WM