The resource cannot be found.

I was playing around with embedded web resources and was having a problem loading some javascript files. When I cut and paste the script link from the source of my page into the browser’s address bar I got the following error message:

The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /SampleSite/WebResource.axd

I wasn’t sure if the error message was that WebResource.axd wasn’t being resolved or if the actual file wasn’t being found. It turned out that this is the error message you get if the WebResource.axd can’t find a resource and that it was the actual javascript file that wasn’t being referenced properly.

My actual problem turned out to be that I was referencing the resource wrongly where I was declaring it in AssemblyInfo.cs.

Posted on 11 Jan 06 by Helen Emerson (last updated on 11 Jan 06).
Filed under ASP.NET, Server controls