The file foo.asmx has not been pre-compiled, and cannot be requested”

There are a few reasons this can occur – in my instance I found that the PrecompiledWeb worked fine if I pointed my local IIS at it, but when I copied it to the live server, some of the pages – and critically, 3 out of 4 of my webservice .asmx pages wouldn’t work with the above error.

It turns out the pages which failed referenced a number of DLLs in the GAC which were on my development PC but not the deployment server. In my case it was the Microsoft Enterprise Application Blocks, but this could have been any referenced assembly. I had the Enterprise Library 4.0 registered in the GAC on my PC and referenced by the website, but only version 3.1 on the deployment server.

So, the only nastiness really is that the error message is misleading…

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s