WebResources.axd 404 Error on IIS

Mar 29, 2008 at 6:16 PM
Edited Mar 29, 2008 at 6:22 PM

I'm having a devil of a job trying to get the existing codebase to work on IIS. It works fine on my integrated 2008 .net Web Server, but when I deploy it to IIS, all I get is 404 errors for the WebResources.axd CSSFriendly calls. After decoding the encrypted parameters, these are the resources my aspx is asking for:

These fail:

These standard ones succeed:

So obviously it's something to do with the way the CSSFriendly code registers the resources.

I have tried using typeof(<CLASS in assembly>) instead of the existing this.GetType() call, as has been recommended elsewhere for problems like this, but to no avail. My current hunch is that the "pApp_Code.qqthibe0" is at fault.

I compiled the latest source into a library and then added a reference to that binary in my Web project. I had to do this as the current downloadable binary still had the multiple post back bug which renders the entire library worse than useless (sorry if I sound a bit bitter, it took me a day to track that one down). Anyway this compiled binary is then used by the browser file in the App_Browsers directory.

Can anybody start by confirming that they have this working on IIS without the CSS directory of scripts on the machine. My current idea is this isn't working at all and it's just falling back to the CSS version for other people.

+ Any idea what on earth is going on!!!?

Thanks for any help

Mar 29, 2008 at 6:50 PM
Edited Mar 29, 2008 at 6:50 PM

Further poking about shows that the resources requested on my own machine (not hosted on IIS) where it works are:


as apposed to:


On the IIS install.

This is with the same binaries etc coppied over.

When I still had the directory full of CSS files on the website, the @Import system fixed the problem and everything was apparently working. I tumbled to all of this as I was trying to eliminate some 404 messages that were triggering exception emails to me. When I used Fiddler to examine the conversations, I started to wonder what was going on. I then managed to decrypt the parameters, and discovered that the CSSFriendly calls were all actually failing. I then removed the CSS file directory, and sure enough the menus all stopped working.

If you didn't try this you would assume that the RegisterClientScript and RegisterEmbeddedCSS calls were working. At the moment the best way forward (short of working out the actual problem) is to simply comment out both of these functions and let the CSS files carry on doing the actual work. This eliminates the 404 errors and stops my email inbox filling with exception messages :)

Of course, I'd like to know why this is happening and actually fix it!

Any thoughts?


Mar 29, 2008 at 9:41 PM
Edited Mar 29, 2008 at 9:42 PM
Okay, mystery solved,

Partly a problem that has already been identified: Source version does not work with WebResources.axd,

part crappy site deployment in 2008 - doesn't remove files even though I could have sworn I said yes when it asked,
partly me not spotting that it had left the adapters in source form on the IIS server. Thus they were used in preference to my binary version. Because of this, the resources were not located within the same NameSpace - hence 404.

Hope this helps someone else :)