[英]Moving from IIS6 .net 2.0 (win2k3) to IIS7.5 .net 4.0 (win2k8) --> how to handle web.config assembly V=2.0.0.0
ASP.net websites : Were moving from IIS6 .net 2.0 (win2k3) to IIS7.5 .net 4.0 (win2k8) - ASP.net网站:从IIS6 .net 2.0(win2k3)移至IIS7.5 .net 4.0(win2k8)-
We have the following assembly entries in the different applications: 在不同的应用程序中,我们具有以下程序集条目:
<add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.DirectoryServices.Protocols, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.RegularExpressions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
<add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
Now the new Win2k8 IIS7.5 (sites set to .net FW 4.0) machine works with the assemblies as is (everything is 2.0.0.0. ), but is the the correct way? 现在,新的Win2k8 IIS7.5(站点设置为.net FW 4.0)计算机按原样(一切都是2.0.0.0。)与程序集一起使用,但是正确的方法是吗?
Q1. Q1。 Should I change all the 我应该改变所有
Version=2.0.0.0
to 至
Version=4.0.0.0
and test the system again? 并再次测试系统?
Q2. Q2。 Is it as easy as changing the Version , what about the PublicKeyToken? 就像更改Version一样容易,那么PublicKeyToken呢? Does the PublicKeyToken change between Version 2.0.0.0 and Version 4.0.0.0? 在2.0.0.0版和4.0.0.0版之间是否会更改PublicKeyToken? If so, do I go look up each one online to get the new PublicKeyToken? 如果是这样,我是否要上网查找每个人以获得新的PublicKeyToken?
Thank you 谢谢
If the application is working fine do not touch it. 如果应用程序运行正常,请不要触摸它。 That is the first rule of problem solving flowchart :) 那是解决问题流程图的第一条规则:)
You could get into trouble if you would change the versions. 如果要更改版本,可能会遇到麻烦。 Your application was compiled with .NET 2.0 and without a full code analysis of changes between .NET 2.0 classes/methods and .NET 4.0 classes/methods you can not be sure what would it do (ie some might be deprecated or gone entirely). 您的应用程序是使用.NET 2.0编译的,并且没有对.NET 2.0类/方法与.NET 4.0类/方法之间的更改进行完整的代码分析,因此您无法确定它会做什么(例如,某些内容可能已被弃用或完全消失)。
As far as I know win2k8 has .NET 2.0 installed so the assemblies should be there. 据我所知,win2k8已安装.NET 2.0,因此程序集应该在那里。 It would be a different matter if you would deploy to windows 2012 which by default has only .NET 4.x installed. 如果要部署到默认仅安装.NET 4.x的Windows 2012,那将是另一回事。 Then it probably would not work. 然后,它可能无法正常工作。
As for the PublicKeyToken it should be the same for .NET 2.0 or .NET 4.0 as long as Microsoft uses the same key to strongly name the assemblies and the name of the assembly does not change (well that would be a different assembly with different PublicKeyToken). 至于PublicKeyToken,对于.NET 2.0或.NET 4.0,它应该是相同的,只要Microsoft使用相同的密钥强烈地命名程序集,并且程序集的名称不发生变化(那将是具有不同PublicKeyToken的另一个程序集) )。
But you still have the option to make a .NET 2.0 pool on IIS 7.5 and let the application run in the environment it was developed for (well if we exclude iis version out). 但是您仍然可以选择在IIS 7.5上建立一个.NET 2.0池,并让该应用程序在为其开发的环境中运行(如果我们排除iis版本,则可以)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.