Category: .NET

IIS not recognizing .aspx extension (404 error)

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.

Continue reading

.NET Error: httpRuntime requestValidationMode=”2.0″

If you get .NET errors that reference

<system.web>
<httpRuntime requestValidationMode="2.0" />
<!-- everything else -->
</system.web>

It means that the application you are trying to run has set the property requestValidationMode to function the way it acted under .NET 2.0, but this directive only makes any sense under .NET 4.0 or greater, and your website is not set up to use .NET 4.

You need to run the application in a separate application pool and set it to run under .NET 4.0 (which, of course, needs to be installed before it can be used).

Continue reading