February 17, 2013

UpdatePanel not working in a migrated web application


I faced an issue with UpdatePanel where its always causing a full page postback instead of an async one. The project is migrated from Visual Studio 2003 to 2005. When automatically migrate a VS 2003 Web Project to VS 2005 ,  <xhtmlConformance mode="Legacy"/>  will be there in web.config file.

Remove that line from web.config. Or change that to <xhtmlConformance mode="Transitional" />

Check whether issue is resolved. I was getting 'Sys' is undefined error at this point of time. So I added following configuration in web.config in system.web section.

<httpHandlers> 
     <remove verb="*" path="*.asmx"/>
     <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory"/>
     <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"/>
</httpHandlers>

Now it is worked fine in development machine. But got issues while published in the production server, where ajax tool kit is not installed.
Could not load file or assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
 If you don't have privilege to install on server, you just need to copy the corresponding dlls from your local machine (assembly folder) to bin folder in the server. To copy the dlls from assembly, you need to follow below steps

  1. Run regsvr32 /u C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\shfusion.dll
  2. Now GAC will be then visible as any normal folder in explorer.
  3. Open “%windir%\assembly\GAC_MSIL”.
  4. Browse to your DLL folder into the deep to find your DLL.
  5. Copy the DLL somewhere on your hard disk
  6. Run regsvr32 /i C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\shfusion.dll to re-register the shfusion.dll file and regain the original distinct view of the GAC.

No comments:

Post a Comment