Solve MS Ajax Script loading error in Safari & Chrome
Jan 16, 2008

Safari 3x and Google Chrome uses javascript engine called WebKit and which causes error similar to

Sys.ScriptLoadFailedException: The script 'http://localhost:2241/WebResource.axd?d=hvpXhV5kE...........' failed to load. Check for:
 Inaccessible path.
 Script errors. (IE) Enable 'Display a notification about every script error' under advanced settings.
 Missing call to Sys.Application.notifyScriptLoaded().

This is because in MicrosoftAjax.js file webkit is not defiened in the list of supported browser and which will cause exception while loading the script in browser.

To overcome this issue

  1. Create a javascript file with any name
  2. Put code below in it
    Sys.Browser.WebKit = {}; //Safari 3 is considered WebKit
    if( navigator.userAgent.indexOf( 'WebKit/' ) > -1 ) 
    {
     Sys.Browser.agent = Sys.Browser.WebKit; 
     Sys.Browser.version = parseFloat( navigator.userAgent.match(/WebKit/(d+(.d+)?)/)[1]); 
     Sys.Browser.name = 'WebKit'; 
    }
  3. In the code of your page put following
    <asp:ScriptManager ID="ScriptManager" runat="server" >
    <Scripts>
    <asp:ScriptReference Path="~/PATH TO YOUR SCRIPT" />
    </Scripts>
    </asp:ScriptManager>

This is using feature called script merge and adds new browser detection code in javascript of Microsoft Ajax.

This will fix the issue.

More information, click here

Prakash Software Solutions PVT LTD. Offer wide range of services to their clients all over the globe. We successfully delivered projects i.e. software development, cloud computing solutions, SharePoint development solutions, mobile app development and Microsoft technology solution to our Sweden, Denmark, Netherlands, France, Norway, Germany, Spain, Italy, Switzerland, Belgium, Luxembourg, Ireland, United Kingdom, United States, Canada, Brazil, Peru, UAE, Dubai, Saudi Arabia, Kuwait, Qatar, Bahrain, Singapore, New Zealand and Australia Clients.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Related Posts

ASP.net: Offering contemporary Support for Enterprise Web Development

With the improvements in science and technology, every field in the area of…

Sep 30, 2013

A Brief Overview of ASP .Net HTTP Handlers and Modules

Whenever a request arrives at an IIS Web server, IIS examines the extension…

Sep 29, 2008

How to open large XML files

Problem: Open large xml files without loading the whole xml file in memory…

Jun 9, 2010
Top

Copyright © Prakash Software Solutions Pvt. Ltd. All Rights Reserved.