Deploying ASP.net Ajax 1.0 and 3.5 web application on same server

对着背影说爱祢 提交于 2019-12-05 23:20:26

The applications should be fine running side-by-side.

If you are distributing the ajax control toolkit as a locally referenced .dll (in other words, you've added the .dll file to your project, and referenced that local file), then you should have no problems with the toolkit.

As for the Ajax (System.Web.Extensions) references, you can do two things:

2) Go through the references in the project and set "SpecificVersion" equal to "true", and that'll force the project to always reference the 2.0 version of it

3) Just use the 3.5 version. If SpecificVersion isn't set to true, this might happen automatically, but if not, you can map the reference in your first project by using the web.config's bindingRedirect element like so:

<configuration>
   <runtime>
      <assemblyBinding>
         <dependentAssembly>
            <assemblyIdentity name="System.Web.Extensions"
                              publicKeyToken="31bf3856ad364e35"
                              culture="neutral" />
            <bindingRedirect oldVersion="1.0.61025.0"
                             newVersion="3.5.0.0"/>
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>

This method is the least invasive, as you don't have to touch the project at all. This will also work for any third party dll's that have explicit references to version 1.0 of System.Web.Extensions.

I've upgraded projects from using the 2.0 framework's version of Ajax to the 3.5 version, and haven't had a single problem.

Good luck!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!