配置方法startup.cs asp.net核心



当我请求页面时。为什么不能在文件startup.cs中的configure方法中进行调试?

应用程序启动时,配置方法是否只运行一次?

是的,ASP.NET Core应用程序的Startup类中的Configure方法在应用程序启动时执行一次。它配置中间件组件,控制应用程序如何响应HTTP请求。

有关此方法的更多信息,请点击此处:https://learn.microsoft.com/en-us/aspnet/core/fundamentals/startup?view=aspnetcore-2.1

下面是ASP.NET Core启动过程的一个很好的概述:https://developer.telerik.com/featured/understanding-asp-net-core-initialization/

最新更新