Problems Publishing a .NET Core Web Application to IIS. Shadow Copying for IIS Deployments.

 
Written by Mark Pringle |
Published on:

Microsoft IISWhen publishing an ASP.NET Core application to Internet Information Services (IIS), you may encounter problems deploying it while the website is running or live on IIS.

If you make changes to a website in your development area and then try to publish it to IIS while the website is online, you will notice that the deployment is not successful. Publishing fails while the web application is running on IIS. Why? Specific files on IIS become locked while in use and cannot be altered or deleted while the application runs. These locked files present a significant problem when updating a website.

I have had this situation occur often and have had to shut down the website during deployment using the app_offline.htm file. Temporarily shutting down a website is not an acceptable solution because your web application will be unavailable to users.

In .NET 6, something called Shadow Copying for IIS deployments is supposed to overcome this obstacle.

Shadow Copying for IIS deployments causes all assemblies in the application path to be copied to a download cache or custom location of your choice before loading them.

Here's more information about enabling and using Shadow Copying for IIS deployments.

Copyright © TravelDailyLife.com

Author: Mark Pringle
I'm just a guy who is addicted to the unfamiliar and who fulfills this addiction by traveling and writing about my travels. As a lover of sports, penning opinion articles related to sports is also a pastime.
My External Website (External Website Opens in New Window)

Comments

Please Login to Comment
No comments have been posted. Be the first.



Hire a Writer