asp.net核心开发模型 [英] asp.net core development model

查看:127
本文介绍了asp.net核心开发模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误. 处理您的请求时发生错误. 开发模式 切换到开发环境将显示有关所发生错误的更多详细信息.

Error. An error occurred while processing your request. Development Mode Swapping to Development environment will display more detailed information about the error that occurred.

不应在已部署的应用程序中启用开发环境,因为它可能导致异常显示的敏感信息显示给最终用户.对于本地调试,可以通过将ASPNETCORE_ENVIRONMENT环境变量设置为Development并重新启动应用程序来启用开发环境.

Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application.

发布iis后如何使用开发模型

how do i use the development model after publish iis

推荐答案

您可以尝试在web.configaspNetCore元素内设置环境变量,如下所示:

You can try setting the environment variable inside the aspNetCore element in the web.config like this:

<aspNetCore....> 
  <environmentVariables> 
    <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> 
  </environmentVariables>
</aspNetCore>. 

对web.config的此类更改应在发布期间保留.

Such a change to web.config should be preserved during publish.

这篇关于asp.net核心开发模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆