3

There are a lot of articles all over the Internet about deploying of .NET Core applications to IIS server, but i still can not find clear answers to the following questions:

  • What is the lifetime of dotnet.exe process running behind of IIS? I guess that in contrast to "classic" IIS managed pools, dotnet process will not be stopped after some idle period.
  • Right now i can not reupload a running application because some files are being used by dotnet.exe process. How to resolve this issue? I can not simply kill this process when i have several .NET Core applications running on the same server...Yes, i know that running each website in container can solve this issue, but i don't have Docker on my Windows Server machine and i had read several articles where people say that running Docker on Windows is some kind of moveton.
  • Does dotnet publish command support MS Deploy publishing? There are some plugins available on VSTS for such publishing, but i want to have an ability to do the same thing from my Visual Studio. There are also a lot of tutorials about publishing, but all such tutorials shows how to publish a website to the local folder, not the remote server.

Thanks.

2 Answers 2

1

It's not managed code, which is to say that IIS is not loading a module to run it as it would with a traditional ASP.NET application, but the lifetime is still tied to the app pool like any other website hosted by IIS. Long and short, configure the app pool how you want it.

Again, the app pool is what matters in terms of starting and stopping. Each of your Core apps should be running in their own app pools, which then means you can independently start/stop each one on their own.

Yes, you can still use Web Deploy. Deployment is really totally separate from what is being deployed. The initial configuration of the site in IIS and the actual build that happens during publish takes care of all the Core-specific differences. Web Deploy is just moving files.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the explanation. How does application pool can control a lifetime of the external process (dotnet.exe)? That's my main misunderstanding - it's clear that i need to kill a dotnet process to overwrite application files during deployment process, does it mean that i can somehow stop IIS app pool (using powershell maybe) and it will stop corresponding dotnet exe process associated with the pool?
0

I don't believe I'm an expert on this issue, but I can share my experiences hosting .net core web api behind IIS.

OT, Compared to Kestrel, my app (and all my POC apps) gets ~40% more rps when hosted on IIS.

  • I use some variant of active/active, and no, the app's lifetime has nothing to do with idle periods
  • Due to my setup, I never have to worry about this issue, however I don't see a way around not restarting services
  • Deploying via .net core cli tools is actually quite easy and robust. Since you're not dockerizing, adding a bit of powershell remoting/invokebuild, could really provide you with all the deployment automation you would ever need.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.