I have a very similar problem, although I don't get the error message, AJAX simply doesn't work - I get a full postback.
My problem is that a ScriptManager is NOT included in my page - When I click on ViewSource on a page and search for ScriptManager and it is not found.
I have also checked that we have the following DLL in the DNN application's BIN directory :
1. System.Web.Extension.DLL
2. AjaxControlToolKit.DLL
system.web.extenstion.dll also exists in the GAC on the web server
My module also has "Support Partial Rendering" set to on
Also, in host Settings "Enable AJAX" setting is checked. So no there is no loope hole.
I have even added the following code into the Page_Init of my module to try and bodge the AJAX
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
'Initialise AJAX
DotNetNuke.Framework.AJAX.RegisterScriptManager()
'DEBUG CODE
Dim scriptMgr As ScriptManager = CType(DotNetNuke.Framework.AJAX.ScriptManagerControl(Me.Page), ScriptManager)
If scriptMgr IsNot Nothing Then
Response.Write("scriptMgr.SupportsPartialRendering = " & scriptMgr.SupportsPartialRendering & "<br/>")
If Not scriptMgr.SupportsPartialRendering Then
'Response.Write("Add Script Mgr" & "<br/>")
'AJAX.AddScriptManager(Me.Page)
'Response.Write("SET scriptMgr.SupportsPartialRendering = True" & "<br/>")
AJAX.SetScriptManagerProperty(Me.Page, "EnablePartialRendering", New Object() {True})
Response.Write("scriptMgr.AFTER SETTING - SupportsPartialRendering = " & scriptMgr.SupportsPartialRendering & "<br/>")
End If
Else
Response.Write("scriptMgr DOES NOT EXIST!!!" & "<br/>")
End If
End Sub
I get the following responses on the page:
scriptMgr.SupportsPartialRendering = False
Add Script Mgr
SET scriptMgr.SupportsPartialRendering = True
scriptMgr.AFTER SETTING - SupportsPartialRendering = False
I have tried EVERYTHING I can think of, but just can't get AJAX working.
Any more suggestions?
ADDENDUM
We are running this site in a web farm with the source code on one server and IIS set-up on another.
We are running IIS6.
In the web.config file we have:
- EnableWebFarmSupport key set to True
- <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
- <!-- ASP.NET AJAX support -->
<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" />
- <handlers>
<add name="AJAX_ScriptResourceHandler" path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv2.0" />
<add name="AJAX_AppServiceHandler" path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv2.0" />
<add name="AJAX_WebServiceHandler" path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv2.0" />
<add name="LogoffHandler*" path="Logoff.aspx" verb="*" type="DotNetNuke.Services.Authentication.LogOffHandler, DotNetNuke" preCondition="integratedMode,runtimeVersionv2.0" />
<add name="RSSJandler" path="RSS.aspx" verb="*" type="DotNetNuke.Services.Syndication.RssHandler, DotNetNuke" preCondition="integratedMode,runtimeVersionv2.0" />
<add name="LinkClickHandler" path="LinkClick.aspx" verb="*" type="DotNetNuke.Services.FileSystem.FileServerHandler, DotNetNuke" preCondition="integratedMode,runtimeVersionv2.0" />
<add name="CaptchaHandler" path="*.captcha.aspx" verb="*" type="DotNetNuke.UI.WebControls.CaptchaHandler, DotNetNuke" preCondition="integratedMode,runtimeVersionv2.0" />
</handlers>
The System.Web.Extensions DLL is present in the GAC of the Web Server
So has anyone out there any ideas why AJAX still doesn't work?
Is it because of the web farm?
Has anyone got AJAX working on a web farm?