Azure中未处理的异常

时间:2015-11-09 22:34:41

标签: c# .net azure

我在这里的方式,试图编写代码以在Azure中的网站上工作。这应该是我在云端演示的演示。我不会在这个程序上获得分数,但它有助于我展示Azure提供的功能。

这可能含糊不清,但如果您可以查看此错误消息,请告诉我是否有任何明显的信息让我知道。

[SEHException (0x80004005): External component has thrown an exception.]
RdGetApplicationConfigurationSetting(UInt16* , UInt16** ) +0
RoleEnvironmentGetConfigurationSettingValueW(UInt16* pszName, UInt16* pszDest, UInt32 cchDest, UInt32* pcchRequiredDestSize) +47
 Microsoft.WindowsAzure.ServiceRuntime.Internal.InteropRoleManager.GetConfigurationSetting(String name, String& ret) +91
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetConfigurationSettingValue(String configurationSettingName) +67
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetConfigurationSettingValue(String configurationSettingName) +67
ContosoAdsWeb.MvcApplication.InitializeStorage() in C:\a\src\ContosoAdsWeb\Global.asax.cs:32
ContosoAdsWeb.MvcApplication.Application_Start() in C:\a\src\ContosoAdsWeb\Global.asax.cs:26

[HttpException (0x80004005): External component has thrown an exception.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +4467101
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +364
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +290

[HttpException (0x80004005): External component has thrown an exception.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +4531288
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +94
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +191

1 个答案:

答案 0 :(得分:0)

我假设你正在使用Azure Web Apps(网站)。情况就是这样:看起来你正在调用RoleEnvironment,这是专门针对Web /辅助角色的,而不是Web应用程序。

几年前我发布了一个类似的答案,更详细一点here