gpt4 book ai didi

asp.net-core - 使用 IIS 而不是 IIS Express 来运行 ASP.Net 核心应用程序

转载 作者:行者123 更新时间:2023-12-05 05:57:05 25 4
gpt4 key购买 nike

如何使用 IIS 而不是 IIS Express 来运行 ASP.Net 核心应用程序?是否可以这样做并将我的应用程序映射到虚拟目录?

最佳答案

How can use IIS instead of IIS Express to run ASP.Net core Application ? Is is possible to do this and can map my application to virtual directory ?

如果您想在 IIS 上部署和托管您的 ASP.NET Core 应用程序,您可以 install the .NET Core Hosting Bundle首先在 IIS 上,然后是 publish your app to a IIS site你创造了。

此外,如果您想使用本地 IIS 运行和调试 ASP.NET Core 应用程序,您可以引用以下文档:

注意:

1) 在调试使用 IIS 运行的 ASP.NET Core 应用时,请以管理员身份运行 Visual Studio

2) 为了使站点在 HTTP 协议(protocol)上按预期运行,请在启动类中注释掉 app.UseHttpsRedirection();

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
//...

//app.UseHttpsRedirection();

//...

关于asp.net-core - 使用 IIS 而不是 IIS Express 来运行 ASP.Net 核心应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68924754/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com