简体   繁体   English

Azure中未处理的异常

[英]unhandled exception in Azure

I am in way over my head here, trying to program a code to work on a website in Azure. 我在这里烦恼,试图编写代码以在Azure中的网站上工作。 This is just supposed to be a demonstration for a presentation I have in the cloud. 这仅是我在云中演示的演示。 I wont be getting marks on this program, but it helps me to display the capabilities offered by Azure. 我不会在此程序上获得分数,但是它可以帮助我显示Azure提供的功能。

This may be vague, but if you can take a look at this error message and let me know if there's anything obvious let me know. 这可能含糊不清,但是如果您可以查看此错误消息,并让我知道是否有明显的问题,请告诉我。

[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

I'm assuming you're using Azure Web Apps (websites). 我假设您正在使用Azure Web Apps(网站)。 That being the case: Looks like you're making calls to RoleEnvironment , which is specifically for web/worker roles, and not Web Apps. 情况就是这样:看起来您正在调用RoleEnvironment ,它专门用于Web /工作人员角色,而不是Web Apps。

I posted a similar answer several years ago, with a bit more detail, here . 几年前,我在这里发布了类似的答案,但有更多详细信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM