2
「不是在託管服務或Development Fabric中運行的」我有下部署在Azure雲服務中運行的WebRole但今天出版後,我收到此錯誤:即使部署到Azure的
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的,所以我不明白怎麼就不能在運行託管服務。
不知道這是關係到你的錯誤,但你可能要看看這篇文章:http://stackoverflow.com/questions/13879443/not-running-in-a-hosted-service-or-the-development-fabric-production-not-debug他們談到了同樣的錯誤與DotNetOpenAuth。 –
你在哪裏看到這個錯誤出現在?事實上,它不能真正啓動跟蹤監視器,這讓我很好奇你在哪裏看到這個錯誤,這可能暗示發生了什麼。這個錯誤信息是如何被捕獲的? – MikeWo