Windows Azure - 未找到 Microsoft.IdentityModel

发布于 2024-10-12 12:12:08 字数 508 浏览 4 评论 0 原文

我在我的机器上安装了 WIF 运行时和 SDK。我将 Microsoft.IdentityModel.dll 添加到我的 Azure Web 应用程序中,并且本地一切运行良好。我构建了使用 Azure AppFabric 访问控制的简单 Web 应用程序。我为此关注了 azure 实验室,正如我所说,本地一切都很棒。当我将 Web 应用程序发布到 Azure 时,出现以下错误:

无法找到程序集“Microsoft.IdentityModel,Version=3.5.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”。

我明白了Appfabric Relaying 部分将在登录身份提供商后返回 url。奇怪的是,我将Copy Local 设置为 TRUE,因为该 .dll 不是 Azure GAC 的一部分。我尝试再次发布它,但收到了同样的错误。我在网上发现了一些同样的问题,但没有具体的解决方案。这里有人有类似的东西并且可能有可行的解决方案吗?先感谢您

I installed WIF runtime and SDK on my machine. I added Microsoft.IdentityModel.dll to my azure web application and locally everything is running great. I build simple web application which use Azure AppFabric Access control. I follow azure labs for that and as I told, local everything is great. When I published my web application to Azure, I'm getting following error :

Unable to find assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

I get it after Appfabric Relaying part is going to return url, after sign in on identity provider. The weird thing is that I set Copy Local to TRUE, because that .dll is not part of Azure GAC. I tried to publish it again, but I received same error. I found few same problems on the internet but with no concrete solution. Does anybody here had something similar and probably have a working solution? Thank you in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

莳間冲淡了誓言ζ 2024-10-19 12:12:09

您是否尝试过在创建部署包时禁用加密并验证 dll 是否确实存在?

Have you tried disabling encryption on the creation of the deployment package and verifying that the dll is indeed present?

失而复得 2024-10-19 12:12:09

创建一个名为:_CSPACK_FORCE_NOENCRYPT_ 的新环境变量,并将值设置为 true。重新启动您的 Visual Studio。

Create a new environment variable called: _CSPACK_FORCE_NOENCRYPT_ set the value to true.Restart your visual studio.

夏见 2024-10-19 12:12:08

对于需要本地部署到 Azure 的任何内容,我在项目文件夹中创建 DLL 的副本,并从那里引用它们,同时将本地复制设置为 true。自从这样做以来,我不再遇到 DLL 未发布到 Azure 的任何问题。我还使用 MSBuild 通过命令行完成所有构建,并手动发布 cspack。这意味着我不依赖 Visual Studio 来进行构建或部署。

For anything that I need to deploy locally to Azure I make a copy of the DLL's in my project folder and reference them from there while setting copy local to true. Since doing this I no longer have any issues with DLL's not being published to Azure. I also do all of my building through the command line using MSBuild and publish the cspack by hand. This means that I do not rely on Visual Studio for doing the build or deployment.

情愿 2024-10-19 12:12:08

我遇到了这个问题以及 这个博客有帮助。您将需要从角色启动任务运行此命令:

gacutil /nologo /i .\Microsoft.IdentityModel.dll  

此启动任务必须以完全权限运行。

I have run into this and solution described in this blog helped. You will need to run this command from your role startup task:

gacutil /nologo /i .\Microsoft.IdentityModel.dll  

This startup task has to be run with full privilegies.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文