# Wednesday, May 16, 2007

DNN Website Offline for MaintenanceI saw a post where someone asked how to put DotNetNuke in Maintenance mode and when working on their sites, particularly upgrading. It can be a pain to say the least, waiting for hundreds of files to upload, and while this is the current status for DotNetNuke upgrades, we have to work around them.

Sometimes I put in a 'default.htm' page, which by default IIS will pick up first, but I'm finding that at times, the site gets visited through other urls and defeats the purpose.  People are clicking through the site, getting errors at times, and worse than that - possibly throwing the install process into action and just making a mess of upgrades and installs. Of course that's your Saturday night gone, along with hours of mucking around waiting for files to upload.

For me, because I have access to the server, it's not a issue, but I certainly feel for those who really don't have the choice but to do the full upload of files, then go through the upgrade or installation process. 

I have tried at times to 'be the end user on a hosted plan' and it's not easy, no matter how people paint a picture of 'easy install' 'wizards' ... it's easier with the files online, but getting them there without interruption.. that's the trick.


With asp net 2, there is a simple file that can be used to take your whole site offline.  The down side to this is that you can't just cloak the front page, but if you're about to do an upgrade or a new installation, and you don't want people to be hitting your site, then it's great while the ftp process is underway.  Then, when the files are uploaded, simply delete this file and the site is live.


It doesn't require any interaction from your hoster, since it's built into IIS, and it's great for those running the DNN 4+ sites using the .NET 2 framework.  I tested it on a DNN 3 site and it didn't work, so you must have a site running on the .NET 2 framework for this to work for you.


What I did was created a small app_offline.htm file that points back to your Portals/0/folder and picks up the logo used on your site, but I suppose you could just drop a logo into the root directory and link from there, and also if you have a virtual directory installation... that's the one that has the root installation pointing to a folder http://www.site.com/dnn/  - that sort of install, if you want to use the reference to the portal logo, you'll need to change the image path by putting in the directory name as well.  

If you have a local installation of dnn, using the virtual directory which most of us use but since it's local anyway, no need to use it.

For convenience, I generally just _ (underscore) the file sitting in the root directory, so it's always there.

app_offline.zip (.65 KB)
Friday, June 08, 2007 5:33:12 PM UTC
Very Good Nina! That works like a charm.
Mark
Saturday, June 09, 2007 12:19:01 AM UTC
Hi Mark - Glad I could help and make a difference - and I wish I had found this one earlier. Just another gem hidden on the internet waiting to be found.

Nina
Nina Meiers
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview
Archive
<August 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456


Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008 Nina Meiers
Sign In