4

[在Azure 论坛上交叉发布,因为我在那里没有得到任何答案]

你好,

我已经使用 SQL Express 在我的 Windows 8 Pro 开发机器上安装了用于 Windows Server 1.1 Preview 的服务总线。我的帐户是本地管理员。

尽管检查队列是否存在似乎可行(至少,不会产生任何错误),但在尝试创建队列时出现异常,提示“指定地址没有托管服务”。

任何帮助,将不胜感激。

谢谢,托马斯

更新:因此,由于我已遵循这些说明,因此缺少域绝对不是问题。我还确定我的身份验证数据是正确的.QueueExists(),例如,如果我更改密码,调用失败。

不过,我在调用时遇到以下异常.CreateQueue()

A first chance exception of type 'Microsoft.ServiceBus.Messaging.MessagingEntityNotFoundException' occurred in Microsoft.ServiceBus.dll
System.Transactions Critical: 0 : 
<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical">
  <TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier>
  <Description>Unhandled exception</Description>
  <AppDomain>ServiceBusTest.vshost.exe</AppDomain>
  <Exception>
    <ExceptionType>Microsoft.ServiceBus.Messaging.MessagingEntityNotFoundException, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</ExceptionType>
    <Message>The remote server returned an error: (404) Not Found. No service is hosted at the specified address..TrackingId:ab98e78f-5bd0-43df-92dc-5703b9f7f5e1_GAdditive,TimeStamp:10/13/13 8:45:46 AM</Message>
    <StackTrace>   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
      at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
      at Microsoft.ServiceBus.NamespaceManager.OnEndCreateQueue(IAsyncResult result)
      at Microsoft.ServiceBus.NamespaceManager.EndCreateQueue(IAsyncResult result)
      at Microsoft.ServiceBus.NamespaceManager.CreateQueue(QueueDescription description)
      at ServiceBusTest.Program.Main(String[] args) in c:\Users\Thomas\Documents\Visual Studio 2012\Projects\ServiceBusTest\ServiceBusTest\Program.cs:line 40
      at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
      at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
      at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
      at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
      at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
      at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
      at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
      at System.Threading.ThreadHelper.ThreadStart()</StackTrace>
    <ExceptionString>The remote server returned an error: (404) Not Found. No service is hosted at the specified address..TrackingId:ab98e78f-5bd0-43df-92dc-5703b9f7f5e1_GAdditive,TimeStamp:10/13/13 8:45:46 AM</ExceptionString>
    <DataItems>
      <Data><Key>DisablePrepareForRethrow</Key><Value></Value></Data>
      <Data><Key>Microsoft.ServiceBus</Key><Value>Microsoft.ServiceBus</Value></Data>
    </DataItems>
    <InnerException>
      <ExceptionType>System.Net.WebException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
      <Message>The remote server returned an error: (404) Not Found.</Message>
      <StackTrace>   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
        at Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.CreateOrUpdateAsyncResult`1.&amp;lt;GetAsyncSteps&amp;gt;b__14(CreateOrUpdateAsyncResult`1 thisPtr, IAsyncResult r)
        at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
      </StackTrace>
      <ExceptionString>System.Net.WebException: The remote server returned an error: (404) Not Found.
        at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
        at Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.CreateOrUpdateAsyncResult`1.&amp;lt;GetAsyncSteps&amp;gt;b__14(CreateOrUpdateAsyncResult`1 thisPtr, IAsyncResult r)
        at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
      </ExceptionString>
    </InnerException>
  </Exception>
</TraceRecord>
4

2 回答 2

5

我遵循了 MSDN 上的示例代码,我遇到了完全相同的错误。我花了一个小时试图找出问题所在,然后我找到了这篇文章,它解释了这个问题。基本上,您需要安装 Service Bus 1.0 Nuget 包而不是 1.1 版本,这会导致一些不兼容问题。下面的文字引自有用的博客文章

该问题的一种解决方案是按照 MSDN 文章中提供的说明升级到“Windows Azure 包:服务总线 1.1”,这涉及卸载 Windows 1.0 的服务总线并使用 Microsoft.ServiceBus.dll 版本 2.1.0.0 .

另一个解决方案是删除 Nuget 包(ServiceBus 1.1 for Windows Server)并安装(ServiceBus 1.0 for Windows Server),这将添加 Microsoft.ServiceBus.dll 版本为 1.8.0.0。

我已将示例代码的详细信息(设置、发送和接收消息)放在此处的博客文章中

于 2014-03-31T04:10:59.423 回答
3

所以最后发现最新版本的Service Bus客户端库(Microsoft.ServiceBus.dll v2.1.3)与Service Bus for Windows Server v1.1 Preview不兼容……切换回v2.0.1解决了这个问题.

于 2013-10-16T04:21:24.783 回答