Azure App Service问题 – 500.79内部服务器错误

huangapple go评论76阅读模式
英文:

Azure App Service Problem - 500.79 Internal Server Error

问题

在我的 Azure 应用服务上托管的 Web API 中出现了问题。在我的本地计算机上,Web API 完全正常运行,但在部署的 Web API 上,我收到以下消息:

"无法显示页面,因为发生了内部服务器错误。"

在日志流中,我收到了以下异常:

System.Reflection.TargetInvocationException: 已引发目标的调用异常。---> System.TypeInitializationException: 'Microsoft.Azure.AppService.Middleware.ModuleUtils' 的类型初始化程序引发了异常。---> System.Net.WebException: 远程服务器返回错误:(400) Bad Request。at System.Net.HttpWebRequest.GetResponse()at Microsoft.Azure.AppService.Middleware.OpenIdConnectConfiguration.Download(String url)at Microsoft.Azure.AppService.Middleware.OpenIdConnectConfiguration.ConfigManager.RefreshConfiguration()at Microsoft.Azure.AppService.Middleware.OpenIdConnectConfiguration.ConfigManager.GetCurrentConfiguration()at Microsoft.Azure.AppService.Middleware.AzureActiveDirectoryProvider.GetDefault()at Microsoft.Azure.AppService.Middleware.AzureActiveDirectoryProvider..ctor(EasyAuthConfig easyAuthConfig)at Microsoft.Azure.AppService.Middleware.Modules.ConfigFactory.GenerateMiddlewareModuleConfig(INameResolver resolver)at Microsoft.Azure.AppService.Middleware.Modules.ConfigFactory.GetCorsConfig(INameResolver resolver)at Microsoft.Azure.AppService.Cors.CorsModule.SetConfig(ConfigFactory configFactory)at Microsoft.Azure.AppService.Cors.CorsModule..ctor(ConfigFactory configFactory)at Microsoft.Azure.AppService.Middleware.ModuleUtils..cctor()--- 内部异常堆栈跟踪的结尾 ---at Microsoft.Azure.AppService.Middleware.ModuleUtils.get_Modules()at Microsoft.Azure.AppService.Middleware.ModuleConfig.ForceLoadConfig()at Microsoft.Azure.AppService.Middleware.ModuleConfig.EnsureConfigLoaded(HttpContextBase context)--- 内部异常堆栈跟踪的结尾 ---at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)at Microsoft.Azure.AppService.Middleware.ModuleManager.LoadModuleConfig(HttpContextBase context)at Microsoft.Azure.AppService.Middleware.ModuleManager.LoadAllModulesAndGetEnabledModules(HttpContextBase context)at Microsoft.Azure.AppService.Middleware.HttpModuleDispatcher.EnsureInitialized(HttpContextBase context)at Microsoft.Azure.AppService.Middleware.HttpModuleDispatcher.d__11.MoveNext()

英文:

I have an problem with my web api hosted on a azure app service. On my local computer the webapi works totaly fine, but on the deployed webapi i get the message:

The page cannot be displayed because an internal server error has occurred.

in the log stream i get this exception:

> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Azure.AppService.Middleware.ModuleUtils' threw an exception. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.at System.Net.HttpWebRequest.GetResponse()at Microsoft.Azure.AppService.Middleware.OpenIdConnectConfiguration.Download(String url)at Microsoft.Azure.AppService.Middleware.OpenIdConnectConfiguration.ConfigManager.RefreshConfiguration()at Microsoft.Azure.AppService.Middleware.OpenIdConnectConfiguration.ConfigManager.GetCurrentConfiguration()at Microsoft.Azure.AppService.Middleware.AzureActiveDirectoryProvider.GetDefault()at Microsoft.Azure.AppService.Middleware.AzureActiveDirectoryProvider..ctor(EasyAuthConfig easyAuthConfig)at Microsoft.Azure.AppService.Middleware.Modules.ConfigFactory.GenerateMiddlewareModuleConfig(INameResolver resolver)at Microsoft.Azure.AppService.Middleware.Modules.ConfigFactory.GetCorsConfig(INameResolver resolver)at Microsoft.Azure.AppService.Cors.CorsModule.SetConfig(ConfigFactory configFactory)at Microsoft.Azure.AppService.Cors.CorsModule..ctor(ConfigFactory configFactory)at Microsoft.Azure.AppService.Middleware.ModuleUtils..cctor()--- End of inner exception stack trace ---at Microsoft.Azure.AppService.Middleware.ModuleUtils.get_Modules()at Microsoft.Azure.AppService.Middleware.ModuleConfig.ForceLoadConfig()at Microsoft.Azure.AppService.Middleware.ModuleConfig.EnsureConfigLoaded(HttpContextBase context)--- End of inner exception stack trace ---at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)at Microsoft.Azure.AppService.Middleware.ModuleManager.LoadModuleConfig(HttpContextBase context)at Microsoft.Azure.AppService.Middleware.ModuleManager.LoadAllModulesAndGetEnabledModules(HttpContextBase context)at Microsoft.Azure.AppService.Middleware.HttpModuleDispatcher.EnsureInitialized(HttpContextBase context)at Microsoft.Azure.AppService.Middleware.HttpModuleDispatcher.<DispatchAsync>d__11.MoveNext()

答案1

得分: 0

500.79: 请求失败,因为Easy Auth模块中出现未处理的异常。

正如David所指出的那样,请按照该博客中的步骤,以确定其原因。

https://learn.microsoft.com/en-us/archive/blogs/benjaminperkins/500-79-internal-server-error

英文:

500.79: The request failed because of an unhandled exception in the Easy Auth module.

As correctly pointed by David , follow the blog which would be helpful in determine the cause for this.

https://learn.microsoft.com/en-us/archive/blogs/benjaminperkins/500-79-internal-server-error

huangapple
  • 本文由 发表于 2020年1月7日 00:17:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/59615461.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定