“The file has not been pre-compiled, and cannot be requested”

exceptioniisweb services

I've installed a set of standard webservices on a Windows 2003, IIS 6 server. When I access anyone of the webservices through my browser I get a .NET yellow screen with the exception:

The file '/SuperOfficeWebService/Contact.asmx' has not been pre-compiled, and cannot be requested.

The same standard webservices (installed through an .msi) works on other machines.

The .asmx files only contain the text "This is a marker file generated by the precompilation tool, and should not be deleted!", as expected.

In the bin\ subfolder I have the .compiled files which match the .asmx files.

What could be causing the error message? Any IIS settings, or .NET 2.0 settings which prevents IIS from loading the compiled files?

Best Answer

In case anyone else is still looking for a solution, I had the same problem. My issue was that I was using 'aspnet_compiler' from the wrong framework folder. My project was created in VS'05 and .net 2.0. I was attempting to precompile from "c:\windows\Microsoft .NET\Framework\v4.xxxx" when I needed to precompile from "c:...\v2.xxxx".

Hope that helps someone.