How can I shut down and restart (only one) ASP.NET 2.0 website on the server?

M

mark4asp

How can I shut down (only one) ASP.NET website on the server.

Problem. I have updated my web-site but the site which I see is the
old one (the one there prior to the update).

I do I force ASP.NET to use the code in the new site - including the
new global.asax settings. ?


I have set the HTTP headers to expire after 1 minute. I have put the
following line in web.config

<authentication mode="Forms">
<forms name="whateversite"
loginUrl="Default.aspx"
protection="Validation"
timeout="5"/>
</authentication>

I have tried stopping and starting IIS.


What do I do to force ASP.NET 2 to end all current sessions and begin
the application anew?

I really don't want to restart the server as there are other websites
running on it.
 
J

Juan T. Llibre

Save either web.config or global.asax so it gets a newer timestamp.
That will automatically restart the application's AppDomain.
 
C

clintonG

Two strategies come to mind

1.) Delete the web.config file. Request a page to force the application to
fail. Use FTP to replace the old web.config file with the new web.config
file.

2.) Go into the Temporary ASP.NET Files directory where ASP.NET keeps its
compiled instance of the application and delete the instance which will be
reconstructed the next time the application is requested.

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files


<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h
 
M

mark4asp

Two strategies come to mind

1.) Delete the web.config file. Request a page to force the application to
fail. Use FTP to replace the old web.config file with the new web.config
file.

2.) Go into the Temporary ASP.NET Files directory where ASP.NET keeps its
compiled instance of the application and delete the instance which will be
reconstructed the next time the application is requested.

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

Thanks, I just discovered that my problem is almost certainly that my
ISP (provider at work - not the host) is probably caching the pages.

I will include the following html in the hope that they stop caching.

<head>
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
</head>

I tried deleting web.config but it had no effect - the same old pages
were still there.
 
H

Hans Kesting

Thanks, I just discovered that my problem is almost certainly that my
ISP (provider at work - not the host) is probably caching the pages.

A way to bypass that cache may be to add a dummy parameter with some
randowm value to the querystring
so instead of
mypage.aspx
use
mypage.aspx?somevar=864

The fact *that* you use a querystring might already be enough to bypass
a cache, else the "new URL" should do the trick.

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top