Posted By

ptomas on 08/20/12


Tagged

javascript error aspnet weconfig 40


Versions (?)

web.config to avoid 'Sys' is undefined error


 / Published in: XML
 

You get "'Sys' is undefined" error in web application. The application works perfectly when run locally. It throws the JavaScript error when run in production. A handler is necessary in web.config to solve this problem. "ScriptResource" is added to the config file.

  1. <system.webServer>
  2. <handlers>
  3. <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  4. </handlers>
  5. <modules runAllManagedModulesForAllRequests="true"/>
  6. <validation validateIntegratedModeConfiguration="false" />
  7. </system.webServer>

Report this snippet  

You need to login to post a comment.