[英]Aspnet Core app throws develoeper exception on Production
I have hosted AspNetCore app as Azure App service.我已将 AspNetCore 应用托管为 Azure 应用服务。 I have done all the things right but production app still throws developer exceptions.我已经做对了所有事情,但生产应用程序仍然会引发开发人员异常。
Code in Configure
function: Configure
函数中的代码:
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseStatusCodePagesWithRedirects("~/Error?statusCode={0}");
app.UseExceptionHandler("/Error");
}
Azure App Service Configuration: ASPNETCORE_ENVIRONMENT : Production Azure 应用服务配置:ASPNETCORE_ENVIRONMENT:生产
Try to delete the environment variable from Azure configuration.尝试从 Azure 配置中删除环境变量。 The default for ASPNETCORE_ENVIRONMENT
variable is production environment. ASPNETCORE_ENVIRONMENT
变量的默认值是生产环境。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.