65

I have an ASP.Net/AJAX control kit project that i am working on. 80% of the time there is no problem. The page runs as it should. If you refresh the page it will sometimes show a javascript error "Sys is undefined".

It doesn't happen all the time, but it is reproducible. When it happens, the user has to shut down their browser and reopen the page.

This leads me to believe that it could be an IIS setting.

Another note. I looked at the page source both when I get the error, and when not. When the page throws errors the following code is missing:

<script src="/ScriptResource.axd?d=EAvfjPfYejDh0Z2Zq5zTR_TXqL0DgVcj_h1wz8cst6uXazNiprV1LnAGq3uL8N2vRbpXu46VsAMFGSgpfovx9_cO8tpy2so6Qm_0HXVGg_Y1&amp;t=baeb8cc" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>

31 Answers 31

56

I fixed my problem by moving the <script type="text/javascript"></script> block containing the Sys.* calls lower down (to the last item before the close of the body's <asp:Content/> section) in the HTML on the page. I originally had my the script block in the HEAD <asp:Content/> section of my page. I was working inside a page that had a MasterPageFile. Hope this helps someone out.

2
  • 2
    So, I'm having this exact same issue. The markup to include the script resource is missing, but at the end of the page, a Sys.Application.initialize(); call is being rendered. This happens on only one page out of a hundred in my application, but I'm not making any Sys. calls myself, nor using any JavaScript or AJAX controls. Any thoughts?
    – Cᴏʀʏ
    Commented Jul 14, 2012 at 19:19
  • 1
    @Cory I'm having the same issue, it seems to fail once in a while, but not all the time. It works fine in a development environment, on my machine and on one server, but not the "main" production server.
    – Holger
    Commented Jul 31, 2012 at 14:14
13

When I experienced the errors

  • Sys is undefined
  • ASP.NET Ajax client-side framework failed to load

in IE when using ASP.NET Ajax controls in .NET 2.0, I needed to add the following to the web.config file within the <system.web> tags:

<httpHandlers>
  <remove verb="*" path="*.asmx"/>
  <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  <add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler" validate="false"/>
</httpHandlers>
2
  • 2
    This worked for me, but only needed the <add verb="GET"... line for .net 2.0 extensions within the HttpHandler as the other lines are for 3.5 Commented Nov 22, 2010 at 5:04
  • Didn't work for me. webpage failed to load with the above lines added. :(
    – Zeek2
    Commented Oct 17, 2017 at 10:17
8

Try setting your ScriptManager to this.

<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" /> 
5
  • It is refreshing to get a different answer then the usual ones. I look forward to trying this out, i will let you know if it works.
    – James
    Commented Sep 17, 2008 at 18:25
  • ok, i had script manager already, but what i was noticing was the enablepartialrendering which was set to false for me, though setting it to true didn't fix my problem. FYI, i also have combinescripts set to true also.
    – James
    Commented Sep 20, 2008 at 1:04
  • 1
    yesterday I was working as normal, today this error pops up. I have changed nothing. I tried every solution here, nothing helped.
    – Zviadi
    Commented Feb 17, 2012 at 18:57
  • 2
    My problem was that I was flat-out missing the ScriptManager. Adding it fixed the problem. Commented Apr 30, 2013 at 19:32
  • 1
    For me the issue was that I needed EnableCdn="true" inside the script manager. So <asp:ScriptManager ID="ScriptManager1" runat="server" EnableCdn="true" /> The partial rendering wasn't the issue in my case.
    – Hawkeye
    Commented Oct 18, 2017 at 23:58
8

Dean L's answer, https://stackoverflow.com/a/1718513/292060 worked for me, since my call to Sys was also too early. Since I'm using jQuery, instead of moving it down, I put the script inside a document.ready call:

$(document).ready(function () {
  Sys. calls here
});

This seems to be late enough that Sys is available.

1
  • Wow, excellent! Only, for me, I just moved it down to the bottom of my page so it would run last. The concept that Sys had to be "ready" to be called didn't occur to me - thought it would've been loaded OnRender, before the Page_Load. Was scratching my eyes out at this one! Thanks! +1
    – vapcguy
    Commented Jun 20, 2016 at 19:36
8

I hate adding to such a huge topic and so much later, but I've think I have a solution that works in VS2015 at the very least.

I was on a hunt to find a reason for the sys error, and the only solution that worked for me was to add EnableCdn="true" in a ScriptManager like this:

<asp:ScriptManager ID="ScriptManager1" runat="server" EnableCdn="true" />

See the MSDN for more information.

Why do we need to do this?

When working on a asp.net web application, you have to enable CDN so that Microsoft can download the Sys. library.

There was probably a script in your page that was using the Sys function. Setting EnableCdn="true" would ensure that the Sys library is downloaded before it is used.

What's CDN?

It stands for "Content Delivery Network" and enabling it allows certain resources to download with simple references.

A quote from https://www.sitepoint.com/7-reasons-to-use-a-cdn/

Most CDNs are used to host static resources such as images, videos, audio clips, CSS files and JavaScript. You’ll find common JavaScript libraries, HTML5 shims, CSS resets, fonts and other assets available on a variety of public and private CDN systems.

Both Google and Microsoft have CDNs. All you have to do is add a reference. Usually CDNs are added via a script resource:

<script src="https://ajax.aspnetcdn.com/ajax/4.5.1/1/MicrosoftAjax.js" type="text/javascript"></script>

Once you set EnableCdn="true" and Microsoft will add its little CDN reference (like the one above) in the page which downloads the Sys library.

I hope that helps anybody that ran into the same issue.

1
  • Even though thinking logically cdn should not be reason for this in my case it "works". Nevertheless hope drop this ancient and overengineered technology as soon as possible.
    – Saulius
    Commented Dec 4, 2017 at 8:47
7

I was using telerik and had exactly same problem.

adding this to web.config resolved my issue :)

<location path="Telerik.Web.UI.WebResource.axd">   
   <system.web>  
     <authorization>  
       <allow users="*"/>  
     </authorization>  
   </system.web>  
</location>

maybe it will help you too. it was Authentication problem.

Source

2
  • 1
    Were you definitely getting an occasional error or was there always an error?
    – Craig
    Commented Jul 19, 2012 at 14:45
  • Where was that location tag placed? It would be a nice thing to have included in the snippet. Commented Mar 7, 2016 at 9:46
6

Try one of this solutions:

1. The browser fails to load the compressed script

This is usually the case if you get the error on IE6, but not on other browsers.

The Script Resource Handler – ScriptResource.axd compresses the scripts before returning them to the browser. In pre-RTM releases, the handler did it all the time for all browsers, and it wasn’t configurable. There is an issue in one of the components of IE6 that prevents it from loading compressed scripts correctly. See KB article here. In RTM builds, we’ve made two fixes for this. One, we don’t compress if IE6 is the browser client. Two, we’ve now made compression configurable. Here’s how you can toggle the web.config.

How do you fix it? First, make sure you are using the AJAX Extensions 1.0 RTM release. That alone should be enough. You can also try turning off compression by editing your web.config to have the following:

<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="false" enableCaching="true" />
</scripting>
</system.web.extensions>

2. The required configuration for ScriptResourceHandler doesn’t exist for the web.config for your application

Make sure your web.config contains the entries from the default web.config file provided with the extensions install. (default location: C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025)

3. The virtual directory you are using for your web, isn’t correctly marked as an application (thus the configuration isn’t getting loaded) - This would happen for IIS webs.

Make sure that you are using a Web Application, and not just a Virtual Directory

4. ScriptResource.axd requests return 404

This usually points to a mis-configuration of ASP.NET as a whole. On a default installation of ASP.NET, any web request to a resource ending in .axd is passed from IIS to ASP.NET via an isapi mapping. Additionally the mapping is configured to not check if the file exists. If that mapping does not exist, or the check if file exists isn't disabled, then IIS will attempt to find the physical file ScriptResource.axd, won't find it, and return 404.

You can check to see if this is the problem by coipy/pasting the full url to ScriptResource.axd from here, and seeing what it returns

<script src="/MyWebApp/ScriptResource.axd?[snip - long query string]" type="text/javascript"></script>

How do you fix this? If ASP.NET isn't properly installed at all, you can run the "aspnet_regiis.exe" command line tool to fix it up. It's located in C:\WINDOWS\Microsoft.Net\Framework\v2.0.50727. You can run "aspnet_regiis -i -enable", which does the full registration of ASP.NET with IIS and makes sure the ISAPI is enabled in IIS6. You can also run "aspnet_regiis -s w3svc/1/root/MyWebApp" to only fix up the registration for your web application.

5. Resolving the "Sys is undefined" error in ASP.NET AJAX RTM under IIS 7

Put this entry under <system.webServer/><handlers/>:

<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

and remove the one under <system.web/><httpHandlers/>.

References: http://weblogs.asp.net/chrisri/demystifying-sys-is-undefined http://geekswithblogs.net/lorint/archive/2007/03/28/110161.aspx

0
5

You must add these lines in the web.config

<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>
</system.web>

Hope this helps.

4

In addition to ensuring you have the ScriptManager on your page you need to ensure that your web.config is appropriately configured.

When ASP.NET AJAX 1.0 was released (for .NET 2.0) there was a lot of custom web.config settings which added handlers, controls, etc.

You'll find the config info here: http://www.asp.net/AJAX/documentation/live/ConfiguringASPNETAJAX.aspx

0
3

Make sure that any client scripts you have that interact with .NET AJAX have the following line at the end:

if (typeof(Sys) !== 'undefined')  Sys.Application.notifyScriptLoaded();

This tells the script manager that the whole script file has loaded and that it can begin to call client methods

0
2

I was having this same issue and after much wrangling I decided to try and isolate the problem and simply load the script manager in an empty page which still resulted in this same error. Having isolated the problem I discovered through a comparison of my site's web.config with a brand new (working) test site that changing <compilation debug="true"> to <compilation debug="false"> in the system.web section of my web.config fixes the problem.

I also had to remove the <xhtmlConformance mode="Legacy"/> entry from system.web to make the update panel work properly. Click here for a description of this issue.

1

I solved this problem by creating separate asp.net ajax solution and copy and paste all ajax configuration from web.config to working project.

here are the must configuration you should set in web.config

    <configuration>
<configSections>
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
        <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
            <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>

    </sectionGroup>
</configSections>

        <assemblies>

            <add assembly="System.Web.Extensions,     Version=1.0.61025.0,       Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

        </assemblies>
           </compilation>
        <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>
</system.web>
    <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
        <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </modules>
    <handlers>
        <remove name="WebServiceHandlerFactory-Integrated"/>
        <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.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=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </handlers>
</system.webServer>
1
  • configSections section was not required for me in Framework 4.6, and actually gave me an error when I put it in. Otherwise, everything else looks good when compared to the AJAX Extensions web.config and mine. For me, the web.config didn't have anything to do with this Sys error, though-it was a JavaScript reference I was making too soon in the page, before it was loaded. But this is a good reference in case we have some lines in our web.config that are missing. :)
    – vapcguy
    Commented Jun 20, 2016 at 19:48
1

In case none of the above works for you, and you happen to be overriding OnPreRenderComplete, make sure you call base.OnPreRenderComplete. My therapist is going to be happy to see me back

1

I had the same problem after updating my AjaxControlToolkit.dll to the latest version 4.1.7.725 from 4.1.60623.0. I've searched and came up to this page, but none of the answers help me. After looking to the sample website of the Ajax Control Toolkit that is in the CodePlex zip file, I have realized that the <asp:ScriptManager> replaced by the new <ajaxtoolkit:ToolkitScriptManager>. I did so and there is no Sys.Extended is undefined any more.

1

In my case the problem was that I had putted the following code to keep the gridview tableheader after partial postback:

    protected override void OnPreRenderComplete(EventArgs e)
    {
        if (grv.Rows.Count > 0)
        {
            grv.HeaderRow.TableSection = TableRowSection.TableHeader;
        }
    }

Removing this code stopped the issue.

0

Was having a similar issue, except that my page was consistently generating the Sys is undefined error.

For me the problem stems from the fact that I've just installed the AJAX 1.0 extension for .NET 2.0 but had already created my web project in Visual Studio.

When tried to create AJAX controls I kept encountering this error, I spotted Slace's and MadMax1138s posts here. And figured it was my web.config, I created a new project using the new "AJAX enabled web site" project type, and sure enough the web.config has a large number of customizations necessary to use the AJAX controls.

I just updated that web.config with the web.config updates I had already made myself and dropped it into my existing project and everything worked fine.

0

I have been seeing the exact same error today, but it was not a config or direct JavaScript issue.

An external .net project had been updated but the changes not picked up properly in the compilation of the web site. My presumption is that ASP.NET ajax was not able to construct the client representations of the .NET objects properly and so was failing to load correctly.

To resolve, I rebuilt the external project(s), and rebuilt my solution that was experiencing issues. The problem went away.

0

I found the error when using a combination of the Ajax Control Toolkit ToolkitScriptManager and URL Write 2.0.

In my <rewrite> <outboundRules> I had a precondition:

<preConditions>
    <preCondition name="IsHTML">
        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html"/>
    </preCondition>
</preConditions>

But apparently some of my outbound rules weren't set to use the precondition.

Once I had that preCondition set on all my outbound rules:

<rule preCondition="IsHTML" name="MyOutboundRule">

No more problem.

0

Make sure you don't have any Rewrite rules that change your url.

In my case the application thought it was only level deeper then the url reached.

Example: http://mysite.com/app/page.aspx was the real url. But i cut off /app/ this worked fine for ASP.net and WCF, but clearly not for Ajax.

0

I had similar problems and to my surprise what I found that one of my developer had saved web.config in the same folder/solution as web123.config and by mistake both of these files were uploaded.

As soon as I deleted the web123.config file, this error disappeared and ajax framework was loading correctly. even though I have

<compilation debug="true">

In my case I also have following segment. My project is using framework 3.5

    <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>
</system.web>
0

This is going to sound stupid but I had a similar problem with a site being developed in VS2010 and hosted in the VS Dev Server. The page in question had a scriptmanager to create the connection to a wcf service. I added an extra method to the service and this error started appearing.

What fixed it for me was changing from 'Auto-assign Port' to 'Specific port' with a different port number in the oroject Web settings.

I wish I knew why...

1
  • Were you talking about the web site's port, or the port to the WCF service? But either way, you'd have to define it so it could connect one-to-the-other, so it makes sense to me...
    – vapcguy
    Commented Jun 20, 2016 at 19:30
0
Development Environment:
  • Dev-Env: VS 2012
  • FX: 4.0/4.5
  • Implementations: Master(ScriptManager + UpdatePanel/Timer) + Content (UpdatePanel)
  • Patterns: PageRouting.

Disclaimer:

If all the web.config solutions do not work for you and you have implemented PageRouting (IIS 7+), then the code snippet below will solve your problems.

Background:

Dont mean to Highjack this question but had the same problem as everyone else and implemented 100% of the suggestions here, with minor modifications for .Net 4.0/4.5, and none of them worked for me.

In my situation i had implemented Page Routing which was ghosting my problem. Basically it would work for about 20, or so, debug runs and then BAM would error out with the Sys is undefined error.

After reviewing a couple other posts, that got to talking about the Clean-URL logic, i remembered that i had done PageRouting setup's.

Here is the resource i used to build my patterns: Page Routing

My one-liner code fixed my VS2012 Debugging problem:

rts.Ignore("{resource}.axd/{*pathInfo}")    'Ignores any Resource cache references, used heavily in AJAX interactions.
0

Even after adding the correct entry for web config still getting this error ? most common reason for this error is JavaScript that references the Sys namespace too early. Then most obvious fix would be move the java script block below the ScriptManager control:

0

I don't think this point has been added and since I just spent some time hunting this down I hope it can help.

I am working with IIS 7 and using the ASP.NET v4 Framework.
In my case it was important that an entry be added to both the and section of the entry in the web.config file.

My web.config file has a lot of handlers and in my case it was easiest to add the ScriptResources entry to the top of the handlers section. Most importantly, it needs to be placed before any entry that will act as a wildcard and capture the request. Adding it after a wildcard entry will cause it to be ignored and the error will still appear.

The module can be added to the top or bottom of the section.

Web.config Sample:

<system.webServer>
    <handlers>
      <clear />
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <!-- Make sure wildcard rules are below the ScriptResource tag -->
    </handlers>
    <modules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <!-- Other modules are added here -->
    </modules>
  </system.webServer>
0

I had same probleme but i fixed it by:

When putting a script file into a page, make sure it is

<script></script> and not <script />.

I have followed this: http://forums.asp.net/t/1742435.aspx?An+element+with+id+form1+could+not+be+found+Script+error+on+page+load

Hope this will help

0

Add

if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); 

Please check enter link description here

0

In my case, I've found a very hidden reason ... There was this page route with in Global.ascx.cs which doesn't appear in my tests in sub-folders but returns the question error all the time .. another day with strange issues.

routes.MapPageRoute("siteDefault", "{culture}/", "~/default.aspx", false, new RouteValueDictionary(new { culture = "(\\w{2})|(\\w{2}-\\w{2})" }));
0

I know this is an old thread but I found a somewhat unique solution. In my case I was getting the error because I am using both Webforms and MVC in the same ASP.NET web application. After mapping routes the issue showed up. I fixed it by adding the following code to ignore routes for both "{resource}.aspx/{*pathInfo}" and "{resource}.axd/{*pathInfo}"

    private void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
           "Default", 
           "{controller}/{action}/{id}", 
           new { controller = "Test", action = "Index", id = UrlParameter.Optional }
       );
    }
-1

Please please please do check that the Server has the correct time and date set...

After about wasting 6 hours, i read it somewhere...

The date and time for the server must be updated to work correctly...

otherwise you will get 'Sys' is undefined error.

-1

Hi thanx a lot it solved my issue ,

By default vs 2008 will add

 <!--<add verb="*" path="*.asmx" validate="false" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false" />-->

Need to correct Default config(Above) to below code FIX

 <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  <add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler" validate="false"/>