Tuesday, December 20, 2011

sys is undefined in asp.net Framework 4.0

      I was using as VS 2010 and SQL server 2008 R2 and build an application which was running fine on my Local  System but when i upload it to my Hosting server (Online) it genrate an error that says 'sys is undefined.  .NET Ajax client-side Framework failed to load' . i was using Routing in my site as well so i thought may be its because of routing so i just create a blank page with AJAX Toolkit but still got the error. To solve this i search all over the internet,read blogs,take experts advice and do what ever they said to solve it but nothing work for me. i add keys in web.config,change in global.ascx but did not work.finally i solved it with a little changes in my IIS7 on the Hosting server which worked for me. 
Here are the steps...

1. Open IIS7 in your server and locate the "Handler Mappings"

2. Now Find the path "ScriptResource.axd" in the list

i.e : if it does not exist in your paths then just add it with following steps.

3. Click "Add Managed Handler..." and add the following code there


System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35


Tip:  if "WebResource.axd" also not exist you can add that one too with following code. Note that both can cause the 'sys is undefined' error.


System.Web.Handlers.AssemblyResourceLoader, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a


Click OK and refresh the site. The error gone. :) It worked for me perfectly according to my scenario. Hope it will help others too or you can search again on Google. Happy Programming....

Many Thanks

1 comment:

  1. This comment has been removed by a blog administrator.