简体   繁体   中英

How to host a asp.net core MVC app in IIS?

I am familiar with .Net in general but new to ASP.Net Core. I just had my first "self-hosted" ASP.Net Core MVC app running (created using templet and runs under Kestrel by default) . What I would like to do now it to host it in-process with IIS. But what I am struggling with is that I couldn't seem to find a clear and detailed instruction/document about what I need to do to get it to work. I have tried various configuration changes on my own but nothing works so far. I am running .Net Core 3.1 and using VS.Net 2019 on my Windows 10 environment. If someone could point me to the right direction it would be highly appreciated.

As far as I know, if you want to host the asp.net core application on the IIS. You should make sure you have installed the right hosting bundle.

Notice: No matter you use in-process or out-of-process, you all need install the IIS hosting bundle.

More details about how to install it, you could refer to this link .

After install the link, you could check your IIS module to make sure you have installed the right asp.net core module.

在此处输入图片说明

Then you could use VS to publish the application to right folder and create the IIS web site as below:

在此处输入图片说明

在此处输入图片说明

Create IIS website:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM