简体   繁体   English

我可以在.NET 4.5中使用Windows Identity Foundation 3.5吗?

[英]Can I use Windows Identity Foundation 3.5 with .NET 4.5?

I'm looking to build some reusable components for an SSO retrofit. 我正在寻找为SSO改造构建一些可重用的组件。 Almost all of the applications are currently on .NET 3.5 or 4.0, however all new projects are being started on .NET 4.5. 几乎所有的应用程序目前都在.NET 3.5或4.0上,但所有新项目都是在.NET 4.5上启动的。

I know a lot of WIF changed with .NET 4.5, so my question is: if I create some reusable components targeting WIF 4.0 that obfuscate the claims interactions, can the .NET 4.5 projects still use these components targeting the previous WIF framework? 我知道很多WIF在.NET 4.5中都有所改变,所以我的问题是:如果我创建一些针对WIF 4.0的可重用组件来模糊声明的交互,那么.NET 4.5项目是否仍然可以使用这些组件来定位以前的WIF框架?

(Note, I'm still a bit fuzzy on the version numbering but I believe WIF jumped directly from 1.0 to 4.5; AFAIK 1.0 was the stable version for both .NET 3.5 & 4.0 previous to the .NET Framework 4.5 release.) (注意,我对版本编号仍然有点模糊,但我相信WIF直接从1.0跳到4.5; AFAIK 1.0是.NET Framework 4.5版本之前.NET 3.5和4.0的稳定版本。)

Before .NET 4.5, all WIF types lived in out-of-band namespaces/assemblies which have now been moved into the core framework. 在.NET 4.5之前,所有WIF类型都存在于带外命名空间/程序集中,这些命名空间/程序集现在已移至核心框架中。 So in .NET 4.5, you can certainly reference the WIF 1.0 assemblies and work with both sets of types simultaneously; 因此,在.NET 4.5中,您当然可以引用WIF 1.0程序集并同时使用这两种类型的程序集; you just need to watch out for namespace collisions when you reference them. 您只需要在引用它们时注意命名空间冲突。

Actually, using WIF 1.0 assemblies from .NET 4.5 is the only recommended way to do things that involve WIF classes which have been made internal in .NET 4.5 (some certificate- & cryptography-related classes). 实际上,使用.NET 4.5中的WIF 1.0程序集是唯一推荐的涉及WIF类的方法,这些类是在.NET 4.5中内部构建的(一些与证书和加密相关的类)。

I would recommend building your reusable components to a common interface, and providing a different implementation for .NET 3.5/4.0 (using WIF 1.0) and .NET 4.5 (using WIF 4.5) (total of 3 assemblies). 我建议将可重用组件构建到一个通用接口,并为.NET 3.5 / 4.0(使用WIF 1.0)和.NET 4.5(使用WIF 4.5)提供不同的实现(总共3个程序集)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM