【发布时间】:2013-11-21 11:00:21
【问题描述】:
我有一个在 Azure 上部署的云服务下运行的 WebRole,但今天发布后我收到此错误:
The server encountered an error processing the request.
The exception message is 'Not running in a hosted service or the Development Fabric.'.
See server logs for more details. The exception stack trace is:
at Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor.GetDefaultStartupInfoForCurrentRoleInstance() at
Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener..ctor() at
Profile.LoginAuthenticate(Stream Params) in
Profile.svc.vb:line 138 at
SyncInvokeLoginAuthenticate(Object , Object[] , Object[] ) at
System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at
System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at
System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
Profile.svc.vb 的第 138 行很简单:
Dim trace As New Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener()
当人们在模拟器中本地运行时,这个错误似乎经常发生,但它已部署到 Azure,所以我不明白它为什么不能在托管服务中运行。
【问题讨论】:
-
不确定这是否与您的错误有关,但您可能想查看这篇文章:stackoverflow.com/questions/13879443/… 他们谈到了与 DotNetOpenAuth 相同的错误。
-
您在哪里看到此错误出现在?它实际上无法启动跟踪监视器的事实让我很好奇您在哪里看到此错误,这可能暗示发生了什么。当前如何捕获此错误消息?
标签: vb.net azure azure-web-roles