开发者

ASP.NET DLL publish method of deployment deletes entire published app

开发者 https://www.devze.com 2022-12-11 20:17 出处:网络
I have an ASP.NET application that is developed on my laptop and deployed on to a server. I use the Build > Publish Web Site method to deploy the app. The problem though is that it deletes the existin

I have an ASP.NET application that is developed on my laptop and deployed on to a server. I use the Build > Publish Web Site method to deploy the app. The problem though is that it deletes the existing web app on the remote server, and uploads the local copy from 开发者_JAVA技巧my laptop. This is not the desired result though, since users are doing things on the remote app, like uploading photos that are stored in the application directory. Is there any way to publish changes without Visual Studio deleting the entire app and uploading the entire updated app?


Short answer is no.

Long answer. If you are changing HTML, styles... basically anything not code related (i.e. C#, dlls, web.config). You can change with little impact.

If you are changing C# code, deploying new dlls or changing the web.config IIS restarts the app pool.

What you could do is have two different instances of the apps on the server. Upload the files to one, which would be offline. Then at the low point in traffic switch over.

You could put up a maintence message. Telling the users that the site will be down at 10pm for routine maintence.

You can also use : App_Offline.htm it's a convenient way of making sure no one connects to your application while your updating the site.

0

精彩评论

暂无评论...
验证码 换一张
取 消