净重定向请求组件,以不同的版本

编程入门 行业动态 更新时间:2024-10-13 16:18:41
本文介绍了净重定向请求组件,以不同的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个组件,它是1.0.0.0版本和新版本是2.0.0.0。两者都装在我的GAC。

I have an assembly that is version 1.0.0.0 and a new version that is 2.0.0.0. Both are installed in my GAC.

目前,我可以用配置的组件部分中的.NET Framework 2.0配置工具来强制执行1.0任何请求被发送到2.0组装我的服务器上。这仍然有效相同的4.0框架,但我需要安装德NET 2.0 SP1获得2.0配置工具。我相信你也能做到这一点与出版商政策,但这些似乎因为你要创建一个serparate组件来执行重定向到多一点的痛苦。

Currently I can use the "Configured Assemblies" section in the ".NET Framework 2.0 Configuration" tool to enforce that any requests for 1.0 are sent to the 2.0 assembly on my server. This still works the same with 4.0 framework but I need to install teh .Net 2.0 SP1 to get the 2.0 configuration tool. I believe you can also do this with "Publisher Policies" but these seem to be a bit more of a pain because you have to create a serparate assembly to perform the redirection.

使用正在向安全模型在.NET 4.0中,并认为,。NET Framework 2.0配置工具尚未安装在默认情况下,也没有更新,因为2.0我想知道的事实,其他的变化; 是有其他更preferred办法执行服务器范围重定向.NET程序集的某些要求的版本

With the other changes that are being made to the security model in .Net 4.0 and the fact that the ".NET Framework 2.0 Configuration" tool has not been installed by default nor updated since 2.0 I wanted to know; is there is any other more preferred way to enforce a server wide redirect for certain requested versions of a .Net assembly?

推荐答案

周杰伦,你可以做你需要在应用程序的配置文件(Web.config或app.config)中,也可位于机器的配置。我个人不会安装.NET 2.0 SP1的仅,以获取配置工具。

Jay you can do what you need in the app config file (web.config or app.config) or also in the machine config. I personally would not install .NET 2.0 SP1 only to get that configuration tool.

下面的例子来自:重定向大会版本

<configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="myAssembly" publicKeyToken="32ab4ba45e0a69a1" culture="en-us" /> <!-- Assembly versions can be redirected in application, publisher policy, or machine configuration files. --> <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="mySecondAssembly" publicKeyToken="32ab4ba45e0a69a1" culture="en-us" /> <!-- Publisher policy can be set only in the application configuration file. --> <publisherPolicy apply="no" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration>

更多推荐

净重定向请求组件,以不同的版本

本文发布于:2023-07-14 20:00:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1106691.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:净重   组件   版本

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!