While trying to install a .NET application on a Windows Server 2003 box, I ran into a problem where the .aspx extension was not being recognized. Browsing .NET pages resulted in 404 (“page not found”) errors. Since the same set of application files had been installed on several other servers without incident, it seemed likely that there was something different about this server. The same version of .NET had been installed on all the servers, but never used.

I had assigned .NET 2.0.50727 to the application using the drop-down menu in the Application properties window in IIS Manager. But apparently, sometimes the .NET installer doesn’t register .NET to IIS, and it has to be done manually.

You can tell that this is the problem, if you have assigned .NET to the application, but when looking in IIS Manager > Web Service Extensions, it does not show up in the list.

beforeregisteringasp.net.jpg

At a command prompt, run the command below, with the path and .NET version altered to match your setup:

C:path_toMicrosoft.NETFramework.NET_version_noaspnet_regiis.exe -i

Examples:

C:WINNTMicrosoft.NETFrameworkv2.0.50727aspnet_regiis.exe -i
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727aspnet_regiis.exe -i

After running this command, if the path was correct, you should now see ASP.NET in the list of web service extensions. Make sure the correct one is set to “Allowed.”

afterRegisteringASP.net.jpg