加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

他为’Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment

发布时间:2020-12-14 02:17:10 所属栏目:Windows 来源:网络整理
导读:将我的Azure Web应用程序移动到SDK 2.1后,我开始了 type initializer for ‘Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment’ threw an exception. 错误信息.这在本地环境中工作正常,但在Azure上出现上述错误. 我的web.config已经有以下条目: runt
将我的Azure Web应用程序移动到SDK 2.1后,我开始了

type initializer for ‘Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment’ threw an exception.

错误信息.这在本地环境中工作正常,但在Azure上出现上述错误.

我的web.config已经有以下条目:

<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.WindowsAzure.StorageClient"
          publicKeyToken="31bf3856ad364e35" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-1.7.0.0" newVersion="1.7.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.WindowsAzure.ServiceRuntime"
          publicKeyToken="31bf3856ad364e35" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-1.8.0.0" newVersion="1.8.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.WindowsAzure.Diagnostics"
          publicKeyToken="31bf3856ad364e35" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
    </dependentAssembly>
  </assemblyBinding>
</runtime>

<system.diagnostics>
  <trace>
    <listeners>
      <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener,Microsoft.WindowsAzure.Diagnostics,Version=2.1.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics">
          <filter type="" />
      </add>
    </listeners>
  </trace>
</system.diagnostics>

仍然没有在实时Azure中工作.有人可以帮帮我吗?

解决方法

您可能正在运行不同于实时Azure实例角色上安装的Windows Azure DLL(默认情况下).右键单击项目中的Microsoft.WindowsAzure.[any]引用,并在“属性”窗口中检查版本号,并尝试将它们与配置文件中的版本号相匹配.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读