Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Cornelia 31 posts 53 karma points
    Apr 06, 2010 @ 12:05
    Cornelia
    1

    How to inform website-users while upgrading?

    Hi

    How do you inform the website-users while upgrading? I want to inform the users while I am upgrading like "the website is temporarly not availabe..".

    Who has a good solution?

    Thanks
    Cornelia

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Apr 06, 2010 @ 12:17
    Lee Kelleher
    0

    Hi Cornelia,

    I wrote a blog post about this a while ago, but it requires the use of ISAPI_Rewrite:

    http://blog.leekelleher.com/2009/09/29/putting-your-asp-net-web-application-in-maintenance-mode-using-isapi_rewrite/

    The htaccess rules only allow your IP address to view the site (in order to perform the upgrade) and redirect all other visitors to an 'offline' or 'maintenance mode' page.

    (ISAPI_Rewrite is commercial software - and you'll need a dedicated server - so its not always an option).

    Other ideas? App_Offline.htm? or have another subdomain and swap them over during the upgrade?

    Cheers, Lee.

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Apr 06, 2010 @ 12:45
    Lee Kelleher
    0

    Just had another idea... BUT it relies on Umbraco itself, so might not work at some point during an upgrade.

    In the /config/umbracoSettings.config, there is an option called <EnableSplashWhileLoading> - set that to true.  This will enable the 'loading' splash page to display for 10 seconds before redirecting to the requested URL.

    Obviously to don't want to redirect them after 10 seconds... so modify the /config/splashes/booting.aspx page to remove the <META refresh> tag and customise it as you like.

    Cheers, Lee.

  • Jamie Howarth 306 posts 773 karma points c-trib
    Apr 06, 2010 @ 13:00
    Jamie Howarth
    1

    There's a free equivalent to ISAPI_Rewrite, which is the donation-ware Ionic ISAPI Rewrite Filter (IIRF) - if I was using this, I'd have everything 302 (temp redirect) to an operational subdomain, unless accessed from a specific IP (yours) so you can still see the "live" site and check upgrade progress and ensure everything works AOK. Probably a better solution rather than using the blanket app_offline solution.

    Hope this helps.

    Benjamin

  • Cornelia 31 posts 53 karma points
    Apr 06, 2010 @ 14:15
    Cornelia
    0

    Thanks for the answers. My hosting provider gives the possibility to use the Ionic ISAPI Rewrite Filter.

    To Benjamin:
    Can I write the following code (like Lee mentionned in his blog) in the IIRF.ini-File?

    RewriteCond %{REQUEST_URI} !/offline.html$ 
    RewriteCond %{REMOTE_ADDR} !^82\.13\.23\.230$ 
    RewriteRule ^(.*)$ /offline.html [R=302,L]

    Thanks
    Cornelia

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Apr 06, 2010 @ 14:30
    Lee Kelleher
    0

    (probably going to cross-post with Benjamin now)

    Yes, you should be able to use the same htaccess syntax with IIRF!

    Good luck, Lee.

  • Angelo 111 posts 260 karma points
    Dec 05, 2014 @ 11:09
    Angelo
    0

    simple ... detailed solutions ... as i like :)

    1-Create a document type 'Offline' (or other name you like)

    2-Create content of type 'Offline'  

    3-Create a Master Macro and put it in your master pages

    4-inside your Master macro:

    umbraco.cms.businesslogic.web.Document offlineDoc = new umbraco.cms.businesslogic.web.Document([ID of your offline content node)]); 

    if (offlineDoc.Published)
           {

           bool bIsIpAuthorized =  [some routine to filter IPS... you might put here your own here ;) ]

            if (!bIsIpAuthorized)
            {
                Response.Redirect("~/Offline");
            }
    }

     

    tcha ran !!  :)

     

    thank you 

     

    AS

     

Please Sign in or register to post replies

Write your reply to:

Draft