我已安装 Windows Identity Foundation,但找不到 Microsoft.IdentityModel dll。根据 Azure Hands-on-Labs,它应该只是在 VS2010 的添加参考中。然而它不存在。
我还查看了 c:\Program Files(x86)\Windows Identity Foundation* 并且它不在其中(或 64 位程序文件文件夹)。
帮助!
NuGet Windows Identity Foundation怎么样。只需将它添加到您的项目中即可!它是 MS 拥有的 NuGet 之一,因此应相应维护。
编辑:在 Windows 8 中,通过在Control Panel > All Control Panel Items > Programs and Features > Turn Windows feature on or off中打开 Windows 功能来安装(启用)Windows Identity Foundation,该功能是Windows Identity Foundation 3.5。上述答案中链接的安装程序将无法在 Windows 8 上运行
您是否安装了Windows Identity Foundation和配套的WIF SDK?
如果您已安装 WIF SDK,请尝试:
C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\
Microsoft.IdentityModel.dll
对于 Windows 10:
右键单击任务栏 Windows 徽标,选择“程序和功能”。
单击“打开或关闭 Windows 功能”
在出现的对话框中,向下滚动或调整窗口大小并选中“Windows Identity Foundation 3.5”旁边的框
单击确定。
这将激活所需的 DLL。显然,Windows 10 将所有这些功能保留在 Windows 安装中,以便它可以按需激活和停用它们。
我遇到了这个问题,但通过引用“C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll”中的 DLL 来修复它
转到引用属性并将 DLL 的 Copy Local 设置为 True。DLL 现在将包含在 azure 包中。
在 Windows 8.1 64 位中,在 C:\Windows\ADFS 下查看
在 Windows 8 及更高版本中,有一种方法可以从命令行启用该功能,而无需通过运行以下命令显式下载/安装任何内容:
dism /online /Enable-Feature:Windows-Identity-Foundation
然后通过在 Windows 磁盘的根目录运行以下命令来找到该文件:
dir /s /b Microsoft.IdentityModel.dll
我有一个类似的问题。我得到一个异常“成员'Microsoft.IdentityModel.Claims.ClaimsPrincipal,Microsoft.IdentityModel,版本= 3.5.0.0,文化=中性,PublicKeyToken = 31bf3856ad364e35'的类型未解析。”。
我尝试从 Visual Studio 运行 ASP.NET 应用程序,它是对 Microsoft.IdentityModel.dll 本地副本的引用。
我不想安装 SDK,我不得不将库复制到目录“C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0”并重新启动 Visual Studio。
检查 3.5 之后更改的命名空间映射,请参阅下面的 URL 了解详细信息。 http://msdn.microsoft.com/en-us/library/jj157091.aspx
安装以下两个链接
注意:(对于 Vista 和 Windows Server 2008 >>> Windows6.0 和对于 Windows 7 和 Windows Server 2008 R2,>>> Windows6.1。)
注意:下载 Visual Studio 2008 和 .NET 3.5 的 3.5 版本,Visual Studio 2010 和 .NET 4.0 的 4.0 版本。
只有这样,您才能获得名为Microsoft.IdentityModel的程序集