A few users have reported encountering an “Operation aborted” error in Internet Explorer when attempting to access a web application built using the .NET Web ADF.
The issue can be traced to a race condition that occurs due to an Internet Explorer/ASP.Net AJAX bug. The probability of encountering this issue increases when the application has a significant number of ADF web controls and/or other ASP.Net AJAX enabled server controls on the web page.
Joel Rumerman has a blog post which describes the issue. Fortunately, he also has a workaround for the problem. He also posted the solution here on the MSDN code gallery. (Note on Oct 16, 2008: Received a note from Joel that he has updated his code.)
To apply the workaround, put the following code block into the markup of the web page before the actual call to Sys.Application.initialize(), or simply place the code after the </form> tag if a ScriptManager control doesn’t exist on the web page.
The exact location of the Sys.Application.initialize() call on a web page containing the ScriptManager web control can be located by viewing source on the web page (Right click + View Source) inside a browser. Typically this call will be towards the bottom of the page, close to the </form> tag. It is important that this code block is declared before the actual method call because it overrides the Sys.Application.initialize() function.
If this is a Web Mapping application built using Manager or the Web Mapping Application template, the code block can be inserted above the sever control tag for the identify control, which looks like this:
<uc1:MapIdentify ID="MapIdentify1" runat="server" MapBuddyId="Map1" />
Here’s the block of code you need to insert:
<script type="text/javascript">
Sys.Application.initialize = function Sys$_Application$initialize() {
if(!this._initialized && !this._initializing) {
this._initializing = true;
var loadMethodSet = false;
var initializeDelegate = Function.createDelegate(this, this._doInitialize);
if (document.addEventListener) {
loadMethodSet = true;
document.addEventListener("DOMContentLoaded", initializeDelegate, false);
}
if (/WebKit/i.test(navigator.userAgent))
{
loadMethodSet = true;
this._load_timer = setInterval(function()
{
if (/loaded|complete/.test(document.readyState))
{
initializeDelegate();
}
}, 10);
}
else
{
/*@cc_on @*/
/*@if (@_win32)
loadMethodSet = true;
document.write("<script id=__ie_onload defer src=javascript:void(0)></scr" + "ipt>");
var deferScript = document.getElementById("__ie_onload");
if (deferScript) {
deferScript.onreadystatechange = function() {
if (this.readyState == "complete") {
initializeDelegate();
}
};
}
/*@end @*/
}
// only if no other method will execute initializeDelegate is
// it wired to the window's load method.
if (!loadMethodSet)
{
$addHandler(window, "load", initializeDelegate);
}
}
}
Sys.Application._doInitialize = function Sys$_Application$_doInitialize() {
if (this._load_timer !== null)
{
clearInterval(this._load_timer);
this._load_timer = null;
}
Sys._Application.callBaseMethod(this, 'initialize');
var handler = this.get_events().getHandler("init");
if (handler) {
this.beginCreateComponents();
handler(this, Sys.EventArgs.Empty);
this.endCreateComponents();
}
this.raiseLoad();
this._initializing = false;
}
Sys.Application._loadHandler = function Sys$_Application$_loadHandler() {
if(this._loadHandlerDelegate) {
Sys.UI.DomEvent.removeHandler(window, "load",
this._loadHandlerDelegate);
this._loadHandlerDelegate = null;
}
this._initializing = true;
this._doInitialize();
}
</script>
Disclaimer: This workaround has been identified to resolve the above stated issue affecting Internet Explorer for ASP.Net AJAX version 1.0 and version 3.5 SP1. Because of the nature of this workaround, subsequent updates to ASP.Net AJAX by Microsoft might make the workaround irrelevant and/or cause other issues. We are actively working with Microsoft to resolve this issue as soon as possible.
Contributed by Nikhil Shampur of the ArcGIS Server .NET software development team