2013-10-04 52 views
1

我在我的應用程序上部署了Web角色的診斷跟蹤偵聽器。通過模擬器運行時,一切正常工作在開發環境中。但在Azure上部署時,我收到以下錯誤 未在託管服務或開發結構中運行。 描述:執行當前Web請求期間發生未處理的異常。請查看堆棧跟蹤以獲取有關該錯誤的更多信息以及源代碼的位置。未在託管服務或開發結構中運行。已部署版本中的錯誤

異常詳細信息:System.InvalidOperationException:在託管服務或Development Fabric中沒有運行。

源錯誤:

在當前web請求的執行過程中生成未處理的異常。關於異常的來源和位置的信息可以使用下面的異常堆棧跟蹤來標識。

堆棧跟蹤:

[出現InvalidOperationException:在託管服務或Development Fabric中未運行] Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor.GetDefaultStartupInfoForCurrentRoleInstance()518 Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener ..構造函數()34

[ConfigurationErrorsException:無法創建Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener,Microsoft.WindowsAzure.Diagnostics,版本= 2.1.0.0,文化=中性公鑰= 31bf3856ad364e35] System.Diagnostics.TraceUtils .GetRun timeObject(字符串的className,類型鹼基類型,字符串initializeData)9004943 System.Diagnostics.TypedElement.BaseGetRuntimeObject()110 System.Diagnostics.ListenerElement.GetRuntimeObject()989 System.Diagnostics.ListenerElementsCollection.GetRuntimeObject()252 System.Diagnostics.TraceInternal.get_Listeners()331 System.Diagnostics.TraceInternal.WriteLine(字符串消息)161 AVAWebApplication.Global.Application_Start(對象發件人,EventArgs的)28

[HttpException(0X80004005):無法創建Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener,Microsoft.WindowsAzure.Diagnostics,]版本= 2.1.0.0,文化=中性公鑰= 31bf3856ad364e35。 System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext的上下文中,一個HttpApplication應用程序)581個 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr的appContext,HttpContext的上下文中,MethodInfo的[]處理程序)179 System.Web.HttpApplication.InitSpecial(HttpApplicationState狀態,MethodInfo的[]處理程序,IntPtr的appContext,HttpContext的上下文中)322 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr的appContext,HttpContext的上下文中)384 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr的appContext)397

[HttpException(0x80004005的):無法創建Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener,Microsoft.WindowsAzure.Diagnostics,版本= 2.1.0.0,文化=中性公鑰= 31bf3856ad364e35。] System.Web.HttpRuntime.FirstRequestInit(HttpContext的上下文中)678 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext的上下文中)159 System.Web.HttpRuntime.ProcessRequestNotificationPrivate (IIS7WorkerRequest WR,HttpContext的背景下)810

任何人可以請幫助?

回答

0

DotNetOpenAuth.Logger似乎與WAD(Windows Azure診斷)衝突。也看到這個帖子:從web.config中Not running in a hosted service or the Development Fabric (Production, not debug/local)

去除微量聽衆:

<trace> 
    <listeners> 
     <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics"> 
      <filter type="" /> 
     </add> 
    </listeners> 
</trace> 
相關問題