Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Ajax client-side framework failed to load

I got this error:

ASP.NET Ajax client-side framework failed to load

with the error:

'Sys' is undefined.

The error qppears in IE on the bottom (error message), and appears only when i'm running the site on server. on my localhost everything works fine.

i moved for new server, and there i have the problem. in my previous server everything was fine.

The problem comes from the SCRIPTMANAGER of the ajax.

what i can to do? somthing in the web.config, or should the host company need to install somthing?

ASP.NET 4, IIS 7.5

The ugly yellow triangle on the IE is not what is disturbing me.. the big problem is that the script manager with the update pannel - dont work !

like image 291
Oshrib Avatar asked Dec 26 '11 19:12

Oshrib


3 Answers

A quick solution is to update your web.config and add following section

<handlers>
    <remove name="WebServiceHandlerFactory-Integrated"/>
    <remove name="ScriptHandlerFactory"/>
    <remove name="ScriptHandlerFactoryAppServices"/>
    <remove name="ScriptResource"/>
    <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
like image 197
Riz Avatar answered Nov 17 '22 03:11

Riz


I had faced the same issue and the culprit was a web.config file from some other app, that was kept on the web root. (Someone had installed the app on web root) Once it was moved inside a folder, the problem disappeared.

like image 3
Mandar Oak Avatar answered Nov 17 '22 03:11

Mandar Oak


I had the same error and, after a lot of head-scratching, I discovered that the custom HttpModule that I had created was intercepting all Http Requests and wasn't limited to .aspx requests only.

My module evaluated some criteria and redirected to a 404 or 500 page where necessary. The problem was that it was doing this for all requests including the requests for .axd resources such as the ScriptManager.axd. By filtering for .aspx files in the module, it all magically began to work again.

Sometimes it's the things right under your nose that are the problem. I hope that this helps some poor sole and saves them the time and effort it took me.

Cheers,

Kaine

like image 1
Kaine Avatar answered Nov 17 '22 03:11

Kaine