.net - 在 azure 上无法找到程序集 'Microsoft.IdentityModel"错误

标签 .net asp.net-mvc-3 azure

我正在为我的 MVC3 Web 应用程序使用 ACS 身份验证。它在我的本地计算机上运行得很好。但是当我将其上传到 Azure 时。我收到此错误。我设置了 CopyLocal=True ,请帮忙

Unable to find assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.Serialization.SerializationException: Unable to find assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

最佳答案

有关此的更多信息。复制本地,即。确保 Microsoft.IdentityModel.dll 位于 bin 目录中,除非您的代码使用 RoleEnvironment API,否则将起作用。如果是这种情况,那么您将遇到以下已知问题:

http://msdn.microsoft.com/en-us/library/windowsazure/hh403974.aspx

在这种情况下,Microsoft.IdentityModel 将需要存在于 Azure VM 的 GAC 中。为此,请使用启动任务。本文介绍了实现此目的的两种方法:

http://blogs.infosupport.com/adding-assemblies-to-the-gac-in-windows-azure/

关于.net - 在 azure 上无法找到程序集 'Microsoft.IdentityModel"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10166114/

相关文章:

asp.net-mvc-3 - EF 4.1 Code First 多重多对多关系

asp.net-mvc-3 - 在MVC3中本地化错误500页面

asp.net-mvc - '[ValidateAntiForgeryToken]' 的真正含义是什么?

windows - 对于我的 Azure 应用程序二进制文件被盗,我应该有多疑虑?

c# - MEF 是否需要 .NET 4?

c# - C# 和 Java 对象的共享业务规则

asp.net - 更改 Office 365 中显示的 Azure Web 应用程序 Logo

c# - Microsoft Graph - GraphServiceClient 使用另一个帐户阅读电子邮件

java - .net/java 框架中反对指南实现/用词不当的示例有哪些?

c# - 如果超时没有完成任务,Task.Wait(int) 是否会停止任务?