tags:

views:

24

answers:

2

I have this idea which I'm not really sure how to implement.

The idea would be that we have a given product implemented in various sites, and the product itself would have a page with a button (let's say it's www.site.com/update) and once you click the button the site goes offline and retrieves the latest version of itself from an online repository (or something similar), is this doable?

are there any corner-cases I should be aware of when developing this feature?

Edit: maybe a more rational solution would be to build / use an app that updates multiple sites at once, instead of letting sites update themselves?

A: 

Well some of this depends on your environment. It is easy to execute a process from ASP.NET if you have control of your environment and all of that. So you could run some custom program or script, etc. Some things to consider are what happens if IIS fails to restart (if you even do that) or some error occurs; what should happen? And worse, what if the site just fails to come up but your script doesn't receive any kind of error - do you need a nanny process to force something to occur, etc. Also, you want to keep in mind the security around allowing the update to occur. Basically, it depends. :)

BobbyShaftoe
A: 

If I were developing something like this my instinct would be to have the update button mark a flag in a db or a file somewhere. Then have a separate app/process that monitors that flag and performs the update.

brendan