473,396 Members | 1,599 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.

how to redeploy .net app without iisreset

Hi,

when I want to upgrade my asp.net web app on the deployment server, my
process is basically this:

1. stop the web site in iis manager
2. in explorer, rename the web root directory from, say, 'foo' to 'foo.old'
3. make a new directory called 'foo'
4. install the new software
5. apply any config changes
6. restart the web site.

Occasionally this process seems to work OK, but most of the time I cannot
perform step 2 without doing an iisreset to unload the DLLs - I get the
standard message about files being locked. This is rather a PITA because
there are several web sites on the same machine and I don't really want to
interrupt the others.

Is there any more forceful way of stopping one web site such that the
asp.net DLLs get unloaded without resoriting to stopping the whole of IIS?

TIA

Andy
Nov 19 '05 #1
4 2403
You are doing things the old way. In asp.net you don't have to start and
stop your web server to redeploy your app. Copy all your file up to the
server (including the .dll if you have one) then asp.net will shut down your
old process and spin off a new process.

What you are doing is exactly what asp.net tried to solve.
"Andy Fish" <aj****@blueyonder.co.uk> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi,

when I want to upgrade my asp.net web app on the deployment server, my
process is basically this:

1. stop the web site in iis manager
2. in explorer, rename the web root directory from, say, 'foo' to
'foo.old'
3. make a new directory called 'foo'
4. install the new software
5. apply any config changes
6. restart the web site.

Occasionally this process seems to work OK, but most of the time I cannot
perform step 2 without doing an iisreset to unload the DLLs - I get the
standard message about files being locked. This is rather a PITA because
there are several web sites on the same machine and I don't really want to
interrupt the others.

Is there any more forceful way of stopping one web site such that the
asp.net DLLs get unloaded without resoriting to stopping the whole of IIS?

TIA

Andy

Nov 19 '05 #2
Hi Andy,

Like you, we found that we had to stop the Web site before uploading a new
version. Although in *theory* it shouldn't be necessary, we ended up with
locked DLLs.

I wonder if there's a way to just change the Web.config of the site you're
uploading? That would cause a reset of that application but not force a stop
of the whole of IIS. You would need to make sure nobody hits the site after
the web.config change and before the new files are copied - otherwise you'd
have the same mess you have now.

Yes, it is a PITA.

Ken
Microsoft MVP [ASP.NET]

"Andy Fish" <aj****@blueyonder.co.uk> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi,

when I want to upgrade my asp.net web app on the deployment server, my
process is basically this:

1. stop the web site in iis manager
2. in explorer, rename the web root directory from, say, 'foo' to
'foo.old'
3. make a new directory called 'foo'
4. install the new software
5. apply any config changes
6. restart the web site.

Occasionally this process seems to work OK, but most of the time I cannot
perform step 2 without doing an iisreset to unload the DLLs - I get the
standard message about files being locked. This is rather a PITA because
there are several web sites on the same machine and I don't really want to
interrupt the others.

Is there any more forceful way of stopping one web site such that the
asp.net DLLs get unloaded without resoriting to stopping the whole of IIS?

TIA

Andy


Nov 19 '05 #3
OK, I did some more experiments using sysinternals process explorer.

Although it doesn't lock the DLLs, it seems to lock the parent directory
(I'm guessing that putting a filesystem watch on a directory locks the
parent directory).

This is why (as the previous reply pointed out) it's posible to simply copy
the new version over the old, even though it's not possible to delete or
rename the old one.

I found that if I edited the web.config file it would remove most of the
locks and then I could rename the web root directory.

In my case, the directory I wanted to rename was one level higher (I have a
structure like /myApp/web/bin where web is the web root). but I found that
after renaming the web directory and waiting a few seconds I could then
rename /myApp directory.

Andy

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:Oc**************@TK2MSFTNGP15.phx.gbl...
Hi Andy,

Like you, we found that we had to stop the Web site before uploading a new
version. Although in *theory* it shouldn't be necessary, we ended up with
locked DLLs.

I wonder if there's a way to just change the Web.config of the site you're
uploading? That would cause a reset of that application but not force a
stop of the whole of IIS. You would need to make sure nobody hits the site
after the web.config change and before the new files are copied -
otherwise you'd have the same mess you have now.

Yes, it is a PITA.

Ken
Microsoft MVP [ASP.NET]

"Andy Fish" <aj****@blueyonder.co.uk> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi,

when I want to upgrade my asp.net web app on the deployment server, my
process is basically this:

1. stop the web site in iis manager
2. in explorer, rename the web root directory from, say, 'foo' to
'foo.old'
3. make a new directory called 'foo'
4. install the new software
5. apply any config changes
6. restart the web site.

Occasionally this process seems to work OK, but most of the time I cannot
perform step 2 without doing an iisreset to unload the DLLs - I get the
standard message about files being locked. This is rather a PITA because
there are several web sites on the same machine and I don't really want
to interrupt the others.

Is there any more forceful way of stopping one web site such that the
asp.net DLLs get unloaded without resoriting to stopping the whole of
IIS?

TIA

Andy

Nov 19 '05 #4
As a result you could copy the current directory to an old one and install
"in place".

IMO the problem is that ASP.NET was designed for "in place" deployment (ie
overwriting the current app) while you actually install in a new
directory...

Patrice
--

"Andy Fish" <aj****@blueyonder.co.uk> a écrit dans le message de
news:%2****************@TK2MSFTNGP09.phx.gbl...
OK, I did some more experiments using sysinternals process explorer.

Although it doesn't lock the DLLs, it seems to lock the parent directory
(I'm guessing that putting a filesystem watch on a directory locks the
parent directory).

This is why (as the previous reply pointed out) it's posible to simply copy the new version over the old, even though it's not possible to delete or
rename the old one.

I found that if I edited the web.config file it would remove most of the
locks and then I could rename the web root directory.

In my case, the directory I wanted to rename was one level higher (I have a structure like /myApp/web/bin where web is the web root). but I found that
after renaming the web directory and waiting a few seconds I could then
rename /myApp directory.

Andy

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:Oc**************@TK2MSFTNGP15.phx.gbl...
Hi Andy,

Like you, we found that we had to stop the Web site before uploading a new version. Although in *theory* it shouldn't be necessary, we ended up with locked DLLs.

I wonder if there's a way to just change the Web.config of the site you're uploading? That would cause a reset of that application but not force a
stop of the whole of IIS. You would need to make sure nobody hits the site after the web.config change and before the new files are copied -
otherwise you'd have the same mess you have now.

Yes, it is a PITA.

Ken
Microsoft MVP [ASP.NET]

"Andy Fish" <aj****@blueyonder.co.uk> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi,

when I want to upgrade my asp.net web app on the deployment server, my
process is basically this:

1. stop the web site in iis manager
2. in explorer, rename the web root directory from, say, 'foo' to
'foo.old'
3. make a new directory called 'foo'
4. install the new software
5. apply any config changes
6. restart the web site.

Occasionally this process seems to work OK, but most of the time I cannot perform step 2 without doing an iisreset to unload the DLLs - I get the
standard message about files being locked. This is rather a PITA because there are several web sites on the same machine and I don't really want
to interrupt the others.

Is there any more forceful way of stopping one web site such that the
asp.net DLLs get unloaded without resoriting to stopping the whole of
IIS?

TIA

Andy


Nov 19 '05 #5

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

Similar topics

3
by: Lee | last post by:
Hello all, I am trying to perform a reboot on my server from an asp page. I have a link on my page that, when clicked on, redirects to a .stm page that displays a message about the server...
1
by: skilla | last post by:
Hi people, I've got WinXP Pro SP2 English on my laptop and since installing SP2 got the IISRESET "No such interface supported" error. The whole story: I was writing a fairly simple ASP app...
2
by: Sunil Menon | last post by:
Dear All, I would like run a program that does an IISReset when aspnet_wp.exe (PID: 1234) was recycled...In IIS service we have a property "Recovery" where you can specify a program to run...but...
5
by: Reader | last post by:
Here is the story. I have my ASP.Net web appliacation that when I uninstall an old version and install a new version the old version's assemblies are still in the system somewhere and cause the...
1
by: Daren | last post by:
Hi, I have a site with page-level caching set at 10 minutes. However, when I update it, I want to be able to empty the cache immediately, so changes are seen right away. At present I manually...
1
by: shai kedem | last post by:
hello, this post is related to iisreset slowness issue I am experiancing. I mean by slowness that IIS reset takes some time to terminate the asp.net working processes and after that starts up...
4
by: dev648237923 | last post by:
I develop my application on my dev server and then I deploy it to a customer's production server. I store the db connection string in web.config (is this best practice?). When I deploy I have to...
3
by: opus18 | last post by:
just as the subject states, our dotnet application just seems to hang if IISRESET is executed. If have to reboot the entire server to get things working again. If I browse to any other standard...
4
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hey guys and misters I was wondering if there was a way to write a VB script (file .vbs, WSH scripting) to do such a thing. I am trying to open inetmgr by code, open services.msc by code, and...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.