What's the best way to deploy an executable process on a web server?

后端 未结 11 1304
一生所求
一生所求 2021-02-02 03:35

The original question:

The title of this question might be a bit clumsily phrased, but here\'s the situation:

I have a .NET web project deployed on my server.

11条回答
  •  名媛妹妹
    2021-02-02 03:44

    In order to make things simple and make sure I would be able to roll back everything, I would create a PowerShell Script that performed the following actions:

    1. Stop the Application Pool.
    2. Copy the current web app to the "history folder" so you can rollback to that version if required
    3. Deploy the new web app
    4. Stop the current admin.exe from services
    5. Uninstall the admin.exe, by executing the Uninstall.bat (this is quite common for Windows Services)
    6. Copy the current admin.exe app to the history folder (see 2)
    7. Copy the new admin.exe to the correct location and run install.bat
    8. Start the new service
    9. Start the application Pool

    You can automate all of that in a Powershell script (the only thing I'm not sure is about the app pool, but I'm pretty sure that you can do this).

    More info on PowerShell can be found here: http://arstechnica.com/business/news/2005/10/msh.ars/2

提交回复
热议问题