By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,983 Members | 2,082 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,983 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.

Jan 15 '07 #1
Share this Question
Share on Google+
4 Replies


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

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"mark4asp" <ma******@gmail.comwrote in message news:1d********************************@4ax.com...
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.

Jan 15 '07 #2

P: n/a
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\Temp orary ASP.NET Files
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h
"mark4asp" <ma******@gmail.comwrote in message
news:1d********************************@4ax.com...
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.

Jan 15 '07 #3

P: n/a
On Mon, 15 Jan 2007 10:30:07 -0600, "clintonG"
<cs*********@REMOVETHISTEXTmetromilwaukee.comwrote :
>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\Tem porary 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.

><%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h
"mark4asp" <ma******@gmail.comwrote in message
news:1d********************************@4ax.com.. .
>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.
Jan 15 '07 #4

P: n/a
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
Jan 16 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.