Tuesday, May 3, 2011

Is there a way to have a Web Farm that serves two different application versions using IIS 7

I have an ASP.NET application. I want to be able to invsibly rollout new versions to our customers (all users logon). I want an "old" site and a "new" site.

The user has one url. Once they are authenticated, they are sent either to the "old" or the "new" site depending on their database version.

Is this possible with IIS 7? How best to do it?

Thanks

From stackoverflow
  • Not sure I'm completely understanding the question but I'm going to make some assumptions. I'm presuming users logon via forms authentication, and that determining the users database version is trivial?

    If so then you can simply host your old and new version in separate virtual directories then make sure they can share authentication cookies. Once the user is successfully verified ( presumably on the new version of the site) if they should be using the old site you redirect them to the default page of that site instead of the new version. I believe the mehod to do the redirect in is RedirectFromLogonPage()

    In addition to prevent the user from using a bookmark to go to the wrong site you could put something in the Session_Start() of Global.asax that does a lookup of the base URL the user should be using and redirect their request appropriately, you'd have to do that in both the new and OLD versions of the site though.

    TygerKrash : The initial URL will always be the same, (the logon page of the new app version of the app say http://server/newversion) so if that is bookmarked theres no problem. I see what you are saying though. If the user bookmarks mid session the url will be for the old version, http://server/oldversion/somepage.aspx. I'll updated my answer with a suggestion..

0 comments:

Post a Comment