Search code examples
c#.net-3.5updatepanel.net-4.5

UpdatePanel async postback mixed .NET mode


I have an .NET 4.5 application with some updatepanels. If I debug the application, or I add the application as separate site to IIS, it all works well. However, this application has to be in a subfolder of an existing website which runs on .NET 3.5.

To let it work a little bit, I allready added the following references to my script manager

<asp:ScriptReference Name="MicrosoftAjax.js" />
<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" />

When I execute an action in an update panel right now, it does a full postback. I think it has to do something with the mixed versions of the main site and the sub application in it. The application runs under a different applicationpool, with the correct .NET version.

I cant update the website to .NET4/4.5 right now so that's not an option.

Maybe it has something to do with the web.config in the root site, one of the things I see is:

<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Should I override it in my sub-application? If so, with what version and public key?

[EDIT]

I tried the following, but doesn't help:

        <remove name="ScriptModule" />
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

Solution

  • I found it. The main web site was originally a .NET1 application upgraded to .NET2 and after it, to .NET3.5.

    In the web.config, there was one line, which breaks down some "new" features like the updatepanels. By removing this line, everything works fine.

    <xhtmlConformance mode="Legacy"/>