[英]How to run .Net MVC in IIS (vs using `dotnet run` for testing locally)
So this is a C#-based .Net WebApp for a client on an Azure deployment on their network. 因此,这是一个基于C#的.Net WebApp,用于网络上Azure部署上的客户端。
Testing locally, I can do dotnet run
and test on http://localhost:5000
fine, but in the final environment, it'll need to be served by IIS. 在本地进行测试,我可以在
http://localhost:5000
上进行dotnet run
和测试,但是在最终环境中,它将需要由IIS提供服务。 I believe dotnet run
(Kestrel) and IIS have a way of talking to each other (there is a method called something like .useIISIntegration
I believe). 我相信
dotnet run
(Kestrel)和IIS有一种相互交谈的方式(我相信有一种名为.useIISIntegration
的方法)。
But I'd like to skip any deployment script that requires I dotnet run
to start the application if possible, but let IIS handle all of that. 但是我想跳过所有需要我
dotnet run
才能启动应用程序的部署脚本,但是让IIS处理所有这些。 Once deployed, is dotnet run
absolutely necessary? 部署后,
dotnet run
绝对必要dotnet run
? How does IIS handle it directly, if possible? 如果可能的话,IIS如何直接处理它?
I guess that for your purpose you can simply: 我想出于您的目的,您可以:
Don't forget to install the SDK/Hosting bundle in the destination server otherwise IIS will not be able to run it. 不要忘记在目标服务器中安装SDK / Hosting捆绑包,否则IIS将无法运行它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.