473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Temporarily Make Web Site Completely Inaccessible

Sorry if this is too far OT - I posted this in the IIS group and got no
response - so here goes:
What would be a good or recommended way to make a Web site in IIS6
inaccessible to users on the Internet. My situation is that I will
periodically update a ASP.NET Web application. While I am making the update
(which will take only a couple of minutes, max) and subsequently checking
that everything works as planned after the update (which may take 5-20
minutes), I don't want any visitors to access *any* pages in the site.
Rather, they should get some page that tells them what to expect (e.g.,
"please try again later" or whatever).

Thanks!
Nov 19 '05 #1
6 2605
Have a look at HttpModule. You can develope one which
checks a DateRange defined in Web.Config and a URL
defined in Web.Config and if a request comes in between
the DateRange you redirect the request to the defined page.

This is normal Maintenance-Mechanism.

Cu Jens

"Jeremy S." <A@B.COM> schrieb im Newsbeitrag
news:OW*************@TK2MSFTNGP12.phx.gbl...
Sorry if this is too far OT - I posted this in the IIS group and got no
response - so here goes:
What would be a good or recommended way to make a Web site in IIS6
inaccessible to users on the Internet. My situation is that I will
periodically update a ASP.NET Web application. While I am making the
update (which will take only a couple of minutes, max) and subsequently
checking that everything works as planned after the update (which may take
5-20 minutes), I don't want any visitors to access *any* pages in the
site. Rather, they should get some page that tells them what to expect
(e.g., "please try again later" or whatever).

Thanks!

Nov 19 '05 #2
Sounds good. Is there any meaningful/noticeable performance penalty for
having this HttpModule?



"Jens Hofmann" <sp**@dev-com.de> wrote in message
news:uE**************@tk2msftngp13.phx.gbl...
Have a look at HttpModule. You can develope one which
checks a DateRange defined in Web.Config and a URL
defined in Web.Config and if a request comes in between
the DateRange you redirect the request to the defined page.

This is normal Maintenance-Mechanism.

Cu Jens

"Jeremy S." <A@B.COM> schrieb im Newsbeitrag
news:OW*************@TK2MSFTNGP12.phx.gbl...
Sorry if this is too far OT - I posted this in the IIS group and got no
response - so here goes:
What would be a good or recommended way to make a Web site in IIS6
inaccessible to users on the Internet. My situation is that I will
periodically update a ASP.NET Web application. While I am making the
update (which will take only a couple of minutes, max) and subsequently
checking that everything works as planned after the update (which may
take 5-20 minutes), I don't want any visitors to access *any* pages in
the site. Rather, they should get some page that tells them what to
expect (e.g., "please try again later" or whatever).

Thanks!


Nov 19 '05 #3
I don't know if there's a penalty but perhaps,
a simple solution -if you use Forms Authentication-
is to rename login.aspx to login.aspx.bak, and setup
a customerrors page which explains that the site will
be back shortly.

When you're done, rename login.aspx.bak back to
login.aspx, and restore your usual customerrors page.

If it's an open site ( no authentication ), you could simply
write an httpHandler which redirects all users to another
Application where you explain what's going on.

You could also do that if you use
Forms or Windows authetication.

Juan T. Llibre
ASP.NET MVP
===========
"Jeremy S." <A@B.COM> wrote in message
news:uF**************@TK2MSFTNGP09.phx.gbl...
Sounds good. Is there any meaningful/noticeable performance penalty for
having this HttpModule?

"Jens Hofmann" <sp**@dev-com.de> wrote in message
news:uE**************@tk2msftngp13.phx.gbl...
Have a look at HttpModule. You can develope one which
checks a DateRange defined in Web.Config and a URL
defined in Web.Config and if a request comes in between
the DateRange you redirect the request to the defined page.

This is normal Maintenance-Mechanism.

Cu Jens

"Jeremy S." <A@B.COM> schrieb im Newsbeitrag
news:OW*************@TK2MSFTNGP12.phx.gbl...
Sorry if this is too far OT - I posted this in the IIS group and got no
response - so here goes:
What would be a good or recommended way to make a Web site in IIS6
inaccessible to users on the Internet. My situation is that I will
periodically update a ASP.NET Web application. While I am making the
update (which will take only a couple of minutes, max) and subsequently
checking that everything works as planned after the update (which may
take 5-20 minutes), I don't want any visitors to access *any* pages in
the site. Rather, they should get some page that tells them what to
expect (e.g., "please try again later" or whatever).

Thanks!



Nov 19 '05 #4
My current deployment process works something like this;

1. Make a copy of production for historical purposes; zip it up, store it
in archives
2. Move the contents of production into an emergency restore directory
(uncompressed)
3. Deploy the appropriate files from TEST to PROD (i.e. no .CS files, no
_temp dirs, etc).
4. Overlay PROD-specific files, such as a Web.config that has PROD database
settings and so on

For the same reasons as you, I've been considering a temporary "Web site is
being updated." page, but because the dir is temporarily empty, I'm not fond
of the temporary page idea or Web.config adjustments.

The direction I'm headed is to programmatically modify the website
configuration in IIS to point to a different directory--one that contains a
mini placeholder website, all pure HTML.

My deployments are done using an in-house tool, so the idea would be to
select the project, deploy to TEST, test it thoroughly, deploy to PROD,
which automatically takes PROD "offline". Once I've verified PROD, I click
the Online button to make access available again.

I haven't gone far down that route, or verified that I can make these
changes to IIS from another machine on the same network, but my initial
research was promising regarding Server2003 so you might consider the same
approach.

The second approach I'm considering is to manage production sites using
versioned directories, e.g.;

c:\inetpub\wwwroot\websitedir\1.0.0.38
c:\inetpub\wwwroot\websitedir\1.0.1.21

With a tool (or some tightly managed procedures), you can extract the
assembly version during deployment and make that its directory name. Then
once you've verified the site is working, "click" you programmatically
update IIS to point the site at the new version directory.

The advantage is that the current site is running until the moment you click
"approved", so there's virtually no downtime; however this clearly presents
issues if you've modified a shared resource, such as a database schema. In
that case PROD(current) would break the moment you make the schema change,
and PROD(new) won't work until you make the schema change.

The placeholder site seems to be the best lowest-common-denominator
solution.

Have fun, and please keep me posted on the direction you take.

/// M

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:ep**************@TK2MSFTNGP15.phx.gbl...
I don't know if there's a penalty but perhaps,
a simple solution -if you use Forms Authentication-
is to rename login.aspx to login.aspx.bak, and setup
a customerrors page which explains that the site will
be back shortly.

When you're done, rename login.aspx.bak back to
login.aspx, and restore your usual customerrors page.

If it's an open site ( no authentication ), you could simply
write an httpHandler which redirects all users to another
Application where you explain what's going on.

You could also do that if you use
Forms or Windows authetication.

Juan T. Llibre
ASP.NET MVP
===========
"Jeremy S." <A@B.COM> wrote in message
news:uF**************@TK2MSFTNGP09.phx.gbl...
Sounds good. Is there any meaningful/noticeable performance penalty for
having this HttpModule?

"Jens Hofmann" <sp**@dev-com.de> wrote in message
news:uE**************@tk2msftngp13.phx.gbl...
Have a look at HttpModule. You can develope one which
checks a DateRange defined in Web.Config and a URL
defined in Web.Config and if a request comes in between
the DateRange you redirect the request to the defined page.

This is normal Maintenance-Mechanism.

Cu Jens

"Jeremy S." <A@B.COM> schrieb im Newsbeitrag
news:OW*************@TK2MSFTNGP12.phx.gbl...
Sorry if this is too far OT - I posted this in the IIS group and got no response - so here goes:
What would be a good or recommended way to make a Web site in IIS6
inaccessible to users on the Internet. My situation is that I will
periodically update a ASP.NET Web application. While I am making the
update (which will take only a couple of minutes, max) and subsequently checking that everything works as planned after the update (which may
take 5-20 minutes), I don't want any visitors to access *any* pages in
the site. Rather, they should get some page that tells them what to
expect (e.g., "please try again later" or whatever).

Thanks!



Nov 19 '05 #5
<<The placeholder site seems to be the best lowest-common-denominator
solution>>
Yes - It looks like we're heading down the same path with the same
rationalle, objectives, and concerns. I will be pursuing the placeholder
site solution via programmatic modification of IIS site definitions next
week, as I'm swamped over the weekend with other work. I'll track this
thread and post my solution here unless you beat me to it.

-JS


"MWells" <outbound__at_sygnal.com> wrote in message
news:eb**************@TK2MSFTNGP12.phx.gbl...
My current deployment process works something like this;

1. Make a copy of production for historical purposes; zip it up, store it
in archives
2. Move the contents of production into an emergency restore directory
(uncompressed)
3. Deploy the appropriate files from TEST to PROD (i.e. no .CS files, no
_temp dirs, etc).
4. Overlay PROD-specific files, such as a Web.config that has PROD
database
settings and so on

For the same reasons as you, I've been considering a temporary "Web site
is
being updated." page, but because the dir is temporarily empty, I'm not
fond
of the temporary page idea or Web.config adjustments.

The direction I'm headed is to programmatically modify the website
configuration in IIS to point to a different directory--one that contains
a
mini placeholder website, all pure HTML.

My deployments are done using an in-house tool, so the idea would be to
select the project, deploy to TEST, test it thoroughly, deploy to PROD,
which automatically takes PROD "offline". Once I've verified PROD, I
click
the Online button to make access available again.

I haven't gone far down that route, or verified that I can make these
changes to IIS from another machine on the same network, but my initial
research was promising regarding Server2003 so you might consider the same
approach.

The second approach I'm considering is to manage production sites using
versioned directories, e.g.;

c:\inetpub\wwwroot\websitedir\1.0.0.38
c:\inetpub\wwwroot\websitedir\1.0.1.21

With a tool (or some tightly managed procedures), you can extract the
assembly version during deployment and make that its directory name. Then
once you've verified the site is working, "click" you programmatically
update IIS to point the site at the new version directory.

The advantage is that the current site is running until the moment you
click
"approved", so there's virtually no downtime; however this clearly
presents
issues if you've modified a shared resource, such as a database schema.
In
that case PROD(current) would break the moment you make the schema change,
and PROD(new) won't work until you make the schema change.

The placeholder site seems to be the best lowest-common-denominator
solution.

Have fun, and please keep me posted on the direction you take.

/// M

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:ep**************@TK2MSFTNGP15.phx.gbl...
I don't know if there's a penalty but perhaps,
a simple solution -if you use Forms Authentication-
is to rename login.aspx to login.aspx.bak, and setup
a customerrors page which explains that the site will
be back shortly.

When you're done, rename login.aspx.bak back to
login.aspx, and restore your usual customerrors page.

If it's an open site ( no authentication ), you could simply
write an httpHandler which redirects all users to another
Application where you explain what's going on.

You could also do that if you use
Forms or Windows authetication.

Juan T. Llibre
ASP.NET MVP
===========
"Jeremy S." <A@B.COM> wrote in message
news:uF**************@TK2MSFTNGP09.phx.gbl...
> Sounds good. Is there any meaningful/noticeable performance penalty for
> having this HttpModule?
>
> "Jens Hofmann" <sp**@dev-com.de> wrote in message
> news:uE**************@tk2msftngp13.phx.gbl...
>> Have a look at HttpModule. You can develope one which
>> checks a DateRange defined in Web.Config and a URL
>> defined in Web.Config and if a request comes in between
>> the DateRange you redirect the request to the defined page.
>>
>> This is normal Maintenance-Mechanism.
>>
>> Cu Jens
>>
>> "Jeremy S." <A@B.COM> schrieb im Newsbeitrag
>> news:OW*************@TK2MSFTNGP12.phx.gbl...
>>> Sorry if this is too far OT - I posted this in the IIS group and got no >>> response - so here goes:
>>> What would be a good or recommended way to make a Web site in IIS6
>>> inaccessible to users on the Internet. My situation is that I will
>>> periodically update a ASP.NET Web application. While I am making the
>>> update (which will take only a couple of minutes, max) and subsequently >>> checking that everything works as planned after the update (which may
>>> take 5-20 minutes), I don't want any visitors to access *any* pages
>>> in
>>> the site. Rather, they should get some page that tells them what to
>>> expect (e.g., "please try again later" or whatever).
>>>
>>> Thanks!
>>>
>>>
>>
>>
>
>



Nov 19 '05 #6
Haven't tried these yet, but got the following solutions that look
promising:

You can also use ADSI to change the home directory of an IIS Web site:. C#
example available here:

http://www.gafvert.info/CSIISModifyHomeDirectory.htm

The IIS 6.0 Script Repository has an example of this available here:
http://www.microsoft.com/technet/scr...b/default.mspx

-JS

"Jeremy S." <A@B.COM> wrote in message
news:ej**************@TK2MSFTNGP15.phx.gbl...
<<The placeholder site seems to be the best lowest-common-denominator
solution>>
Yes - It looks like we're heading down the same path with the same
rationalle, objectives, and concerns. I will be pursuing the placeholder
site solution via programmatic modification of IIS site definitions next
week, as I'm swamped over the weekend with other work. I'll track this
thread and post my solution here unless you beat me to it.

-JS


"MWells" <outbound__at_sygnal.com> wrote in message
news:eb**************@TK2MSFTNGP12.phx.gbl...
My current deployment process works something like this;

1. Make a copy of production for historical purposes; zip it up, store
it
in archives
2. Move the contents of production into an emergency restore directory
(uncompressed)
3. Deploy the appropriate files from TEST to PROD (i.e. no .CS files, no
_temp dirs, etc).
4. Overlay PROD-specific files, such as a Web.config that has PROD
database
settings and so on

For the same reasons as you, I've been considering a temporary "Web site
is
being updated." page, but because the dir is temporarily empty, I'm not
fond
of the temporary page idea or Web.config adjustments.

The direction I'm headed is to programmatically modify the website
configuration in IIS to point to a different directory--one that contains
a
mini placeholder website, all pure HTML.

My deployments are done using an in-house tool, so the idea would be to
select the project, deploy to TEST, test it thoroughly, deploy to PROD,
which automatically takes PROD "offline". Once I've verified PROD, I
click
the Online button to make access available again.

I haven't gone far down that route, or verified that I can make these
changes to IIS from another machine on the same network, but my initial
research was promising regarding Server2003 so you might consider the
same
approach.

The second approach I'm considering is to manage production sites using
versioned directories, e.g.;

c:\inetpub\wwwroot\websitedir\1.0.0.38
c:\inetpub\wwwroot\websitedir\1.0.1.21

With a tool (or some tightly managed procedures), you can extract the
assembly version during deployment and make that its directory name.
Then
once you've verified the site is working, "click" you programmatically
update IIS to point the site at the new version directory.

The advantage is that the current site is running until the moment you
click
"approved", so there's virtually no downtime; however this clearly
presents
issues if you've modified a shared resource, such as a database schema.
In
that case PROD(current) would break the moment you make the schema
change,
and PROD(new) won't work until you make the schema change.

The placeholder site seems to be the best lowest-common-denominator
solution.

Have fun, and please keep me posted on the direction you take.

/// M

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:ep**************@TK2MSFTNGP15.phx.gbl...
I don't know if there's a penalty but perhaps,
a simple solution -if you use Forms Authentication-
is to rename login.aspx to login.aspx.bak, and setup
a customerrors page which explains that the site will
be back shortly.

When you're done, rename login.aspx.bak back to
login.aspx, and restore your usual customerrors page.

If it's an open site ( no authentication ), you could simply
write an httpHandler which redirects all users to another
Application where you explain what's going on.

You could also do that if you use
Forms or Windows authetication.

Juan T. Llibre
ASP.NET MVP
===========
"Jeremy S." <A@B.COM> wrote in message
news:uF**************@TK2MSFTNGP09.phx.gbl...
> Sounds good. Is there any meaningful/noticeable performance penalty
> for
> having this HttpModule?
>
> "Jens Hofmann" <sp**@dev-com.de> wrote in message
> news:uE**************@tk2msftngp13.phx.gbl...
>> Have a look at HttpModule. You can develope one which
>> checks a DateRange defined in Web.Config and a URL
>> defined in Web.Config and if a request comes in between
>> the DateRange you redirect the request to the defined page.
>>
>> This is normal Maintenance-Mechanism.
>>
>> Cu Jens
>>
>> "Jeremy S." <A@B.COM> schrieb im Newsbeitrag
>> news:OW*************@TK2MSFTNGP12.phx.gbl...
>>> Sorry if this is too far OT - I posted this in the IIS group and got

no
>>> response - so here goes:
>>> What would be a good or recommended way to make a Web site in IIS6
>>> inaccessible to users on the Internet. My situation is that I will
>>> periodically update a ASP.NET Web application. While I am making the
>>> update (which will take only a couple of minutes, max) and

subsequently
>>> checking that everything works as planned after the update (which
>>> may
>>> take 5-20 minutes), I don't want any visitors to access *any* pages
>>> in
>>> the site. Rather, they should get some page that tells them what to
>>> expect (e.g., "please try again later" or whatever).
>>>
>>> Thanks!
>>>
>>>
>>
>>
>
>



Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Fran Shescher | last post by:
If you have damaged any of your Visual Basic Professional 3.0 disks, replacements can be found here: http://www.geocities.com/peanutbutter88888 This is ONLY for LEGAL users of VB Pro 3 ......
0
by: tin | last post by:
some of our visitors have complaint to us that our site is inaccessible when they have software that blocked doubleclick.net ads or their ISP blocking *.doubleclick.net site. Yes, we do use...
3
by: Dennis M. Marks | last post by:
Take a look at the new www.amtrak.com site. It looks like all pages are built dynamically using javascript. All of the page sources look the same. I used to have direct links to some of the...
64
by: Dave | last post by:
A friend of mine pointed out the other day that certain elements on my web site are too small. But in most of what I publish, fonts are at default size or smaller, and my images are easy to see. I...
7
by: AES | last post by:
Would anyone want to voice any opinions on this web site: < http://cyberatlas.guggenheim.org/home/index.html> It's apparently the home page of the Guggenheim Museum in New York. When it...
1
by: Thomas Barnet-Lamb | last post by:
I was wondering if anyone could give me some help with the following. Consider the code snippet: struct qqq{typedef qqq* pointer;}; template<class al> struct foo : public al { template...
80
by: Andrew R | last post by:
Hi I'm creating a series of forms, each with with around 15-20 text boxes. The text boxes will show data from tables, but are unbound to make them more flexible. I want the form to be used...
37
by: Vince C. | last post by:
Hi all. I've installed Bloodshed Dev-C++ on a Windows 2000 SP4 machine. I'm using MinGW 3.4.2. I'd like to temporarily disable standard functions to write to stderr, i.e. for instance...
5
by: Joakim Hove | last post by:
Hello, I have written a program in C; this programs uses an external proprietary library. When calling a certain function in the external library, the particular function writes a message to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.