Microsoft JScript runtime error: ‘Sys’ is undefined


Hi

I was getting this error while working on asp.net 2.0.

Microsoft JScript runtime error: ‘Sys’ is undefined

This error will come mainly due to this reasons
1. If you are using ajax control and if you donot have keep “ajax enabled web confi file”.Then it will throw this error.

To solve this problem, you have to keep ajax enable web confi file like this,you have to add in system.web tag in web confi file

<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>

or you have to remove ajax control from your project.

Advertisement

4 thoughts on “Microsoft JScript runtime error: ‘Sys’ is undefined

  1. Abdulrahman February 19, 2012 / 2:48 pm

    Thank you, It took me almost my whole day trying to fix it
    I appreciated 🙂

    • Chandra Dev February 22, 2012 / 2:04 am

      I m glad to know that my artical helped you.

  2. Tesfaye May 14, 2012 / 7:44 pm

    Phew! Thanks for posting this. You saved me from potentially wasting a day trying to fix this “little” issue.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.