简体   繁体   English

从IIS6 .net 2.0(win2k3)迁移到IIS7.5 .net 4.0(win2k8)->如何处理web.config程序集V = 2.0.0.0

[英]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.

相关问题 为什么.NET app.config为win2k3加载规则不同? - Why are .NET app.config load rules different for win2k3? WCF .svc文件在IIS7.5 .NET 4.0中作为纯文本提供 - 不在默认网站下 - WCF .svc file served as plain text in IIS7.5 .NET 4.0 - Not under Default Web Site 如何使用.NET将报表打印到选定的打印机,SAP Crystal在64位服务器(Win2k8)上报告Engine 64位? - How to print reports to the chosen printer using .NET, SAP Crystal reports Engine 64 bit on a 64 bit server (Win2k8)? 如何在具有现有Framework 2.0网站的IIS6上运行.NET Framework 4.0网站 - How to run .NET Framework 4.0 website on IIS6 with existing framework 2.0 websites 如何在web.config文件(iis 7.5)中重写URL? - How do rewrite the url in web.config file(iis 7.5)? 如何从C#上的IIS7 w / .net 4上的web.config中读取一节 - How to read a section from web.config on IIS7 w/ .net 4 in C# NET 4.0,IIS 7.5的温莎城堡 - castle windsor with .net 4.0 ,iis 7.5 如何? 在具有IIS7.5的远程服务器上开发.NET 4.5应用程序并具有调试功能 - HOW TO? Develop .NET 4.5 Application on Remote Server with IIS7.5 AND Have Debugging Capabilities WIN2K8 R2公共消息队列 - WIN2K8 R2 Public Message Queues 在应用程序web.config中设置时,IIS 7.5不压缩JSON - IIS 7.5 not compressing JSON when set in application web.config
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM