Here\'s the background info first. ASP.NET 2.0 Web Site with AJAX Extensions 1.0.
I have a weird issue that only occurs in Safari and I can only assume Chrome as we
1-create WebKit.js
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';
}
2-change ScriptManager
<asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="600">
<Scripts>
<asp:ScriptReference Path="~/JScripts/webkit.js" />
</Scripts>
</asp:ScriptManager>
Well after some more digging, I found out the issue. It has nothing to do with the PageRequestManager
's add_endRequest(...)
method and everything to do with Browser detection in the ASP.NET AJAX client-side API for Safari and WebKit based browsers.
Thanks to this post from taliesins on the ASP.NET forums, http://forums.asp.net/t/1252014.aspx. I found this post by first seeing that I was getting this error:
Sys.ScriptLoadFailedException: The script 'http://localhost:2241/WebResource.axd?d=hvpXhV5kEMwLgAoaIglURevR_XTtDTBoKZ3aZWWaIvEkBXbLudri1AIv5bRs5f6licjCZMs3Z3MioQLqLTXV98582pKDHkD7BucGkKsPLz41&t=633444640020014740' 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().
even though I was calling Sys.Application.notifyScriptLoaded()
in my JavaScript.
Show stopper resolved.