使用Microsoft.ServiceBus库的未处理异常 [英] Unhandled exception using Microsoft.ServiceBus library

查看:89
本文介绍了使用Microsoft.ServiceBus库的未处理异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在部署承载辅助角色的Azure云服务后,我面临一个问题.

我正在部署暂存实例.通过Visual Studio Azure模拟器对其进行调试,一切正常,但是在运行时角色正在回收并且VM正在连续重新启动.

我阅读了Azure提供的疑难解答指南,但他们建议通过RDP连接,并且使用这种持续重启的连接是不可能的.

无论如何,错误很明显:

未处理的异常:找不到方法:"System.String System.String.Format(System.IFormatProvider,System.String,System.Object,System.Object)".在Microsoft.ServiceBus.Messaging.Configuration.KeyValueConfigurationManager.Validate()处 在 Microsoft.ServiceBus.NamespaceManager.CreateFromConnectionString(String connectionString) ...

在命名空间管理器的CreateFromCionnectionString方法中失败,该方法在程序包Windows.AzureServiceBus中包含的Microsoft.ServiceBus库中实现.版本是最新的(Microsoft.ServiceBus为3.0.0).

能否请您帮助我了解正在发生的事情,如果您已经经历过呢?

非常感谢.

解决方案

已修复.

该问题与安装在远程VM中的.NET版本的框架有关.

在本地调试期间,我的模拟器使用的是.NET 4.6.2,但是VM仅具有.NET 4.5.2.

降级框架角色运行后:)


Hi all,

I am facing an issue after the deployment of an Azure Cloud Service that hosts a worker role. 

I am deploying the Staging instance. Debugging it through Visual Studio Azure Simulator everything goes ok, but at runtime role is recycling and VM is restarting continuously. 

I read the troubleshooting guide provide by Azure, but they suggest to connect through RDP, and with this continuous restarts connection is not possible.

Anyway, error is quite clear:

Unhandled Exception: Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object, System.Object)'. at Microsoft.ServiceBus.Messaging.Configuration.KeyValueConfigurationManager.Validate() at Microsoft.ServiceBus.Messaging.Configuration.KeyValueConfigurationManager.CreateNamespaceManager() at Microsoft.ServiceBus.NamespaceManager.CreateFromConnectionString(String connectionString)...

It's failing in the CreateFromCionnectionString method of NamespaceManager, implemented in library Microsoft.ServiceBus, contained into package Windows.AzureServiceBus. Versions are up-to date (Microsoft.ServiceBus is at 3.0.0).

Can you please help me to understand what's happening and if youalready have experienced it? 

Thanks very much in advance.

解决方案

Fixed. 

The issue was related to the .NET version of framework installed in Remote VM. 

During my local debug my simulator was using .NET 4.6.2, but VM has only .NET 4.5.2. 

After downgrading framework role was running :)


这篇关于使用Microsoft.ServiceBus库的未处理异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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