1

I'm getting JavaScript errors on a SharePoint publishing site, just browsing to any page.

In IE the errors are like:

Syntax error: WebResource.axd 
Line: 1 
Char: 1 
Code: 0 
URI: http://intranet/WebResource.axd?d=vpxv...

If I view them in the Firefox error console the errors look like:

Error: The stylesheet http://intranet/WebResource.axd?d=vpxv... was not loaded because its MIME type, "text/html", is not "text/css".

Source File: http://intranet/Pages/home.aspx Line: 0

(Note: I've truncated the URI of the WebResource.axd in the question here to fit it on the screen.)

1

I figured this out -- basically one of the assemblies I was using didn't have the necessary files embedded as resources.

First I used FireBug to view what was actually being pulled in by the calls to WebResource.aspx. Rather than the .js and .css files they were supposed to be, they were just pulling in HTML error pages (hence the MIME type error.)

This useful question at StackOverflow links to this article which provides a way to decrypt the encrypted resource identifier in the d parameter of the WebResource.aspx call to determine which assembly is being referred to.

It turns out the assembly in question didn't have some files that were being referenced in the code actually included as embedded resources.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.