Azure的SDK 1.4 - WIF - C ++的模块加载失败,同时试图初始化默认应用程序域 [英] Azure SDK 1.4 - WIF - The C++ module failed to load while attempting to initialize the default appdomain

查看:273
本文介绍了Azure的SDK 1.4 - WIF - C ++的模块加载失败,同时试图初始化默认应用程序域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我这是在蔚蓝1.2 SDK运行,并依靠WIF进行身份验证旧的Azure应用程序。

I have an old azure application which was running on the azure 1.2 SDK and relies on WIF for authentication.

我最近一直在试图将其更新到最新的SDK(1.4)。

I have recently been trying to update it to the latest SDK (1.4).

该应用程序编译并运行在Azure上,包括我的STS认证。然而,网站上的某些页面只是不会加载抛出以下错误。

The applications compiles and runs on Azure, including authenticating with my STS. However some pages on the site just will not load throwing the following errors.

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



[SerializationException: Unable to find assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
   System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +4767763
   System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +1725
   System.AppDomain.get_Id() +0
   <CrtImplementationDetails>.DoCallBackInDefaultDomain(IntPtr function, Void* cookie) +191
   <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* ) +354
   <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) +102

    [ModuleLoadException: The C++ module failed to load while attempting to initialize the default appdomain.
    ]
       <CrtImplementationDetails>.ThrowModuleLoadException(String errorMessage, Exception innerException) +50
       <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) +169
       .cctor() +33

我已经确保了WIF依赖设置为本地复制 - 这是工作 - 一些网页的工作。

I have ensured that the WIF dependency is set to copy local - and it is working - some pages work!

这是如何解决这个任何想法?

any ideas on how to resolve this?

编辑:错误只发生在访问tablestorage页

The error only occurs on pages that access tablestorage

推荐答案

它看起来像错误是通过调用Microsoft.WindowsAzure.ServiceRuntime从而改变你的webrole的AppDomain的方法造成的。

It looks like the error is caused by calling methods from Microsoft.WindowsAzure.ServiceRuntime which changes the appdomain of your webrole.

为了解决这个问题,你可以硬code连接字符串为您的应用程序(或使用web.config文件),而不是蔚蓝的配置。 (A真可怜解决这个问题)

In order to get around this you can hardcode your connection string into your app (or use web.config) instead of the azure config. (A really poor solution to this problem)

另外,您可以在使用说明:<一href=\"http://blogs.infosupport.com/blogs/eriko/archive/2011/01/14/adding-assemblies-to-the-gac-in-windows-azure.aspx\" rel=\"nofollow\">http://blogs.infosupport.com/blogs/eriko/archive/2011/01/14/adding-assemblies-to-the-gac-in-windows-azure.aspx补充一点,你有麻烦的蔚蓝GAC的任何组件。

Alternatively you can use the instructions at: http://blogs.infosupport.com/blogs/eriko/archive/2011/01/14/adding-assemblies-to-the-gac-in-windows-azure.aspx to add any assemblies that you have trouble with to the azure GAC.

推荐阅读如果遇到类似的问题:

Recommended reading if you encounter a similar issue:

<一个href=\"http://social.msdn.microsoft.com/Forums/kk-KZ/windowsazuretroubleshooting/thread/35d37b41-b638-4023-aaab-b8134ac27278\" rel=\"nofollow\">http://social.msdn.microsoft.com/Forums/kk-KZ/windowsazuretroubleshooting/thread/35d37b41-b638-4023-aaab-b8134ac27278

<一个href=\"http://blog.smarx.com/posts/how-to-resolve-setconfigurationsettingpublisher-needs-to-be-called-before-fromconfigurationsetting-can-be-used-after-moving-to-windows-azure-sdk-1-3\" rel=\"nofollow\">http://blog.smarx.com/posts/how-to-resolve-setconfigurationsettingpublisher-needs-to-be-called-before-fromconfigurationsetting-can-be-used-after-moving-to-windows-azure-sdk-1-3

这篇关于Azure的SDK 1.4 - WIF - C ++的模块加载失败,同时试图初始化默认应用程序域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆