You cannot publish a site if streaming media

On my website I play music using HTML5 audio.

I have a problem: if the music is currently playing, I cannot publish via FTP.

When I publish, in visual studio I check the ability to delete all files first.

I understand why the publication fails. The file is in use (it is streaming) and it cannot delete it!

I appreciate that this is not a coding problem, but it concerns me as a developer, and I suspect other developers.

I have a problem: I can’t publish if no one is streaming media while I am trying to publish. This is a crazy position.

My question is: how to publish my site?

+4
source share
1 answer

You can use the app.offline file in your root folder

If you run the application in the .NET 4.0 application pool (IIS 7.0 or IIS 7.5), or your website is configured as an ASP.NET 4.0 website (IIS 6.0) and would like to show your customers “under maintenance” for a limited time , the easiest way is to put a file called app_offline.htm in the root folder of websites. Then your application will be disconnected, and customers will be served using the app_offline.htm page, regardless of what they want.

When you are done with the maintenance, just delete or rename the file and everything will return to normal.

reference 1

reference 2

reference 3

+1
source

Source: https://habr.com/ru/post/1649202/


All Articles