Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebResource.axd not found

I can't get script files to load on my website. Everything else works fine. I haven't tried ScriptResource.axd however.

I have verified this issue exists on both cassini and IIS7.

I have verified my 64bit 4.0 web.config contains the mapping for WebResource.axd.

My system time is correct (I heard there may be issues with that).

I have verified that it works in other projects, so the culprit has to be my web application.

My web application is 4.0 MVC3 web application.

My web.config can be found here.

This error is killing me! Any help would be appreciated!

Resource not found

like image 966
Paul Knopf Avatar asked Dec 12 '11 04:12

Paul Knopf


4 Answers

Plesk Admins, Please disable the Web Application Firewall to solve this issue.

Tools & Settings > Web Application Firewall > Turn Off

Cheers!

like image 99
Dirty_Programmer Avatar answered Sep 29 '22 22:09

Dirty_Programmer


Your web.config file is amazing (it's not a compliment): in .NET Framework 4.0, it should be much shorter/lighter.
I think that your handler is declared in the wrong section :

<system.webServer>
    <handlers>
        <add name="WebResource" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
    </handlers>
</system.webServer>

Normally, the WebResource.axd handler is declared in "system.web" section :

<system.web>
    <httpHandlers>
        <add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
    </httpHandlers>
</system.web>
like image 5
CedX Avatar answered Oct 27 '22 22:10

CedX


I resolved a similar issue by adding read permissions for Everyone to the folder where the assembly containing the embedded resource was located. Clearly Everyone is overkill, but that might help others researching similar issues.

In our case some resources loaded (so I know the AssemblyResourceLoader was working) and it worked on one machine but not another.

This answer to another question helped me determine what assemblies were not working.

like image 5
codyzu Avatar answered Oct 28 '22 00:10

codyzu


I solved this issue on a production machine running again aspnet_regiis:

%WINDIR%\Microsoft .NET\Framework\4.xxxx\aspnet_regiis -i

Probably the standard installation of the framework 4 went wrong.

like image 4
onof Avatar answered Oct 27 '22 23:10

onof