2013-10-04 54 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> 
相关问题