简体   繁体   中英

IIS - Application doesn't work on second deploy

I'm working on a .NET MVC 5 application hosted on IIS.

I have the following problem: After I deploy the app for the first time it works fine.

But after I make a change to an app and deploy again (or just change Web.config) file application doesn't start (or it does start but goes into infinite loop - I don't know which) and requests to the site take forever (they never get response). After I restart the IIS application starts again and works fine. Problem does not happen when debugging on local machine.

Obviously you won't be able to solve my particular problem, I'm just looking into ways how can I diagnose what exactly is causing the issue...

You don't give enough info to debug the issue, but it sounds like your app is still running while your trying to deploy it. Disable the app, then deploy and restart should resolve your issue.

Simple builtin solution is to create an ~/App_Offline.htm file in your webroot before updating your app, then remove it after. This will ensure the app domain is killed before you modify its files. See my answer below for more info:

IIS fails to restart with a timeout error

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