views:

132

answers:

2

I have a small web app (Mvc) that I need to periodically update (no ftp or other access).

I would like that from the "Super Ultra Mega administratior" page direcly in the app I can spin up the update process.

I know this is not the best security approach but I can live with it and I would like to avoid a permanent service that continuosly ping for a new version when this is not really necessary.

What I think right now is to have a windows service with the correct write permission credential that could be called from a secured web page to :

  • stop iis service (not stricly required)
  • download via a secured url the latest version of the app (zip file)
  • backup the zipped old web app on the server in a dir (c:\backups\v1_01102010.zip)
  • uncompress the downloaded zip file in the dir of the web app
  • restart iis
  • (eventually be able to revert the process)

Does something like this already exist?

I have seen a bunch of auto updater for .net mainly targeted to winform or desktop applications that seems too complicated for this simple process.

I do not need to write or modify the registry but just automate the zip extraction without user interaction.

+1  A: 

Hi Ronnie,

Here at Nolio we've recently launched a free version of our automation tool. It can do exactly what you need with very little effort. You will also be able to create the Nolio Flow and then have somebody else run it, even if they don't have permissions to access the remote server.

Check out http://www.nomorescripts.com

Daniel

Daniel Kushner
A: 

Well if you are going to write a web service then getting it to handle the zipping and unzipping of files shouldnt be too difficult. There are zip libraries which you can use within c# ( http://www.icsharpcode.net/OpenSource/SharpZipLib/ ). Stopping and Starting IIS can be done using the ServiceController class ( http://msdn.microsoft.com/en-us/library/system.serviceprocess.servicecontroller.aspx )

Kaius