I have tried both an ASP.NET ScriptManager object and a RadScriptManager object with both producing the same error (it seems that the RadScriptManager uses the MicrosoftAjax.js file).
My ScriptManager is contained within a MasterPage, so my first thought was that I should move the RadAjaxManager to the MasterPage, also. I am receiving the same error regardless of the location of the RadAjaxManager.
Here is my code to instantiate the Rad objects on the MasterPage:
<telerik:RadScriptManager runat="server" ID="masterScriptManager" ScriptMode="Auto">
</telerik:RadScriptManager>
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
</telerik:RadAjaxManager>
Here is my javascript on the contentpage to fire the event
//Initiate AJAX request to update the page
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
if (ajaxManager != null)
ajaxManager.ajaxRequest();
Here is the javascript that receives the error in the MicrosoftAjax.js file:
Sys.Net.XMLHttpExecutor =
function Sys$Net$XMLHttpExecutor() {
/// <summary locid="M:J#Sys.Net.XMLHttpExecutor.#ctor" />
if (arguments.length !== 0) throw Error.parameterCount();
Sys.Net.XMLHttpExecutor.initializeBase(
this);
var _this = this;
this._xmlHttpRequest = null;
this._webRequest = null;
this._responseAvailable = false;
this._timedOut = false;
this._timer = null;
this._aborted = false;
this._started = false;
this._onReadyStateChange = (function() {
if (_this._xmlHttpRequest.readyState === 4) {
try {
if (typeof (_this._xmlHttpRequest.status) === "undefined") {
return;
}
}
catch (ex) { return; }
_this._clearTimer();
_this._responseAvailable =
true;
try {
_this._webRequest.completed(Sys.EventArgs.Empty);
}
finally { <------------------------- Access Denied error received on this line
if (_this._xmlHttpRequest != null) {
_this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;
_this._xmlHttpRequest = n
ull;
}
}
}
});
this._clearTimer = (function() {
if (_this._timer != null) {
window.clearTimeout(_this._timer);
_this._timer =
null;
}
});
this._onTimeout = (function() {
if (!_this._responseAvailable) {
_this._clearTimer();
_this._timedOut =
true;
_this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;
_this._xmlHttpRequest.abort();
_this._webRequest.completed(Sys.EventArgs.Empty);
_this._xmlHttpRequest =
null;
}
});
}
Other items of note in doing some research:
1. There seems to be an underlying theme in the Google searches that this is a bug in the ASP.NET framework when you use frames or iframes on your webpages. I am NOT using frames or iframes anywhere in my project. I have also tried the modification to the MicrosoftAjax.js found at http://weblogs.asp.net/bleroy/archive/2007/01/31/how-to-work-around-the-quot-access-denied-quot-cross-domain-frame-issue-in-asp-net-ajax-1-0.aspx to no avail.
2. Another underlying theme Google searches is cross domain issues. Everything is running on my development workstation under the localhost domain. This is done with the built-in web server in Visual Studio 2008. I have also tried adjusting my security settings based on http://msdn.microsoft.com/en-us/magazine/cc301993.aspx to no avail.
3. I am using the ASP.NET 3.5 controls/framework.
4. On the content page I have a RadGrid and RadScheduler. Both of these have datasources that are datatables bound in the code-behind.
In summary, this issue only happens when I make a call to the AjaxRequest event attached to the RadAjaxManager. It is very frustrating and dissappointing because the RadAjaxManager is a very powerful tool that will enhance our application, if it works properly.
Thanks in advance,
Christian