Saturday, March 24, 2012

w3wp.exe locking DLL and PDB files.

Hi,
i have an ASP.NET project that is using a (Class Library Project) VB.NET DLL
.
for some reason after running some pages on the web server, and trying to co
mpile the Class Library DLL, it can't compile because the DLL is in use (and
the PDB too), and the w3wp.exe process is the process locking the DLL (as v
iewed with Sysinternals - Process Explorer).
this is a huge problem. i need to do IIS reset in order to free the DLL!
1. why is the w3wp.exe process is locking a class library dll and not lockin
g the asp.net DLL?
2. what will be in production environment, if i have to stop the web server
in order to replace the DLL, it is unacceptable.
3. with asp-dot-net DLLs i only have to replace the DLL and the web server i
s updated. now with shared Class Library project I should have more problems
?
please help it's urgent.
TIA, z.I assume you mean that the codebehind ASP.NET DLL is in use after the first
time the DLL is triggered by requested the corresponding page from the IIS s
erver ?
For performance reasons (amongst others), an ASP.NET DLL gets loaded the fir
st time it is needed and it stays loaded.
You can unload (or change the way the loading is done) by using the "Interne
t Information Services" applet ("Application Protection" and "Unload")
Wim
"z. f." <zigi@.info-scopeREMSPAM.co.il> wrote in message news:utsg31T0EHA.152
4@.TK2MSFTNGP09.phx.gbl...
Hi,
i have an ASP.NET project that is using a (Class Library Project) VB.NET DLL
.
for some reason after running some pages on the web server, and trying to co
mpile the Class Library DLL, it can't compile because the DLL is in use (and
the PDB too), and the w3wp.exe process is the process locking the DLL (as v
iewed with Sysinternals - Process Explorer).
this is a huge problem. i need to do IIS reset in order to free the DLL!
1. why is the w3wp.exe process is locking a class library dll and not lockin
g the asp.net DLL?
2. what will be in production environment, if i have to stop the web server
in order to replace the DLL, it is unacceptable.
3. with asp-dot-net DLLs i only have to replace the DLL and the web server i
s updated. now with shared Class Library project I should have more problems
?
please help it's urgent.
TIA, z.
i'm sorry to tell you that your response is not accurate.
first the IIS is not locking my aspnet DLL. i can replace it any time even i
f a minute ago i run a page that is using this DLL.
the IIS is locking a regular VB.NET DLL that is referenced and used by my as
pnet DLL.
lets say i have a vb.net web application called mywebapp and is compiled to
mywebapp.dll
and mywebapp is using a dll that is written as a class library project and i
s called util.dll
all projects are located on a development server (win2003) called devserver.
i use my browser to tun http://devserver/mywebapp/homepage.aspx
homepage.aspx codebehind is compiled into the mywebapp.dll and is using util
.dll
if i make changes to util.dll project and want to compile it now, the dll is
in use and can't be build again.
if i make changes to my homepage.aspx codebehind and compile it to mywebapp.
dll - there is no problem.
this behavior is unaccepted and it is urgent for me to solve this.
"wl" <nospam@.nospam> wrote in message news:OYWBjDV0EHA.2688@.TK2MSFTNGP09.phx
.gbl...
I assume you mean that the codebehind ASP.NET DLL is in use after the first
time the DLL is triggered by requested the corresponding page from the IIS s
erver ?
For performance reasons (amongst others), an ASP.NET DLL gets loaded the fir
st time it is needed and it stays loaded.
You can unload (or change the way the loading is done) by using the "Interne
t Information Services" applet ("Application Protection" and "Unload")
Wim
"z. f." <zigi@.info-scopeREMSPAM.co.il> wrote in message news:utsg31T0EHA.152
4@.TK2MSFTNGP09.phx.gbl...
Hi,
i have an ASP.NET project that is using a (Class Library Project) VB.NET DLL
.
for some reason after running some pages on the web server, and trying to co
mpile the Class Library DLL, it can't compile because the DLL is in use (and
the PDB too), and the w3wp.exe process is the process locking the DLL (as v
iewed with Sysinternals - Process Explorer).
this is a huge problem. i need to do IIS reset in order to free the DLL!
1. why is the w3wp.exe process is locking a class library dll and not lockin
g the asp.net DLL?
2. what will be in production environment, if i have to stop the web server
in order to replace the DLL, it is unacceptable.
3. with asp-dot-net DLLs i only have to replace the DLL and the web server i
s updated. now with shared Class Library project I should have more problems
?
please help it's urgent.
TIA, z.
I'm assuming your not using the GAC, right?
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 23 Nov 2004 15:18:41 +0200, "z. f."
<zigi@.info-scopeREMSPAM.co.il> wrote:

>i'm sorry to tell you that your response is not accurate.
>first the IIS is not locking my aspnet DLL. i can replace it any time even
if a minute ago i run a page that is using this DLL.
>the IIS is locking a regular VB.NET DLL that is referenced and used by my a
spnet DLL.
>lets say i have a vb.net web application called mywebapp and is compiled to
mywebapp.dll
>and mywebapp is using a dll that is written as a class library project and
is called util.dll
>all projects are located on a development server (win2003) called devserver
.
>i use my browser to tun http://devserver/mywebapp/homepage.aspx
>homepage.aspx codebehind is compiled into the mywebapp.dll and is using uti
l.dll
>if i make changes to util.dll project and want to compile it now, the dll i
s in use and can't be build again.
>if i make changes to my homepage.aspx codebehind and compile it to mywebapp
.dll - there is no problem.
>this behavior is unaccepted and it is urgent for me to solve this.
>
>
>"wl" <nospam@.nospam> wrote in message news:OYWBjDV0EHA.2688@.TK2MSFTNGP09.ph
x.gbl...
> I assume you mean that the codebehind ASP.NET DLL is in use after the fir
st time the DLL is triggered by requested the corresponding page from the II
S server ?
> For performance reasons (amongst others), an ASP.NET DLL gets loaded the
first time it is needed and it stays loaded.
> You can unload (or change the way the loading is done) by using the "Inte
rnet Information Services" applet ("Application Protection" and "Unload")
> Wim
>
> "z. f." <zigi@.info-scopeREMSPAM.co.il> wrote in message news:utsg31T0EH
A.1524@.TK2MSFTNGP09.phx.gbl...
> Hi,
> i have an ASP.NET project that is using a (Class Library Project) VB.NE
T DLL.
> for some reason after running some pages on the web server, and trying to compi
le the Class Library DLL, it can't compile because the DLL is in use (and the PDB to
o), and the w3wp.exe process is the process locking the DLL (as viewed with Sysinter
nal
s - Process Explorer).
> this is a huge problem. i need to do IIS reset in order to free the DLL
!
> 1. why is the w3wp.exe process is locking a class library dll and not l
ocking the asp.net DLL?
> 2. what will be in production environment, if i have to stop the web se
rver in order to replace the DLL, it is unacceptable.
> 3. with asp-dot-net DLLs i only have to replace the DLL and the web ser
ver is updated. now with shared Class Library project I should have more pro
blems?
>
> please help it's urgent.
> TIA, z.
i don't use the GAC, but in order to solve the problem of DLL copies all aro
und i use a codebase hint in the web.config of my web application. in order
to do this i assign a strong name to the DLL and a fix version number.
should this cause any problem with locking the DLL differently from the defa
ult way?
"Scott Allen" <bitmask@.[nospam].fred.net> wrote in message news:42i6q091j66ksfbqkpqr
ejn3h11o85npri@.4ax.com...
I'm assuming your not using the GAC, right?
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 23 Nov 2004 15:18:41 +0200, "z. f."
<zigi@.info-scopeREMSPAM.co.il> wrote:

>i'm sorry to tell you that your response is not accurate.
>first the IIS is not locking my aspnet DLL. i can replace it any time even
if a minute ago i run a page that is using this DLL.
>the IIS is locking a regular VB.NET DLL that is referenced and used by my a
spnet DLL.
>lets say i have a vb.net web application called mywebapp and is compiled to
mywebapp.dll
>and mywebapp is using a dll that is written as a class library project and
is called util.dll
>all projects are located on a development server (win2003) called devserver
.
>i use my browser to tun http://devserver/mywebapp/homepage.aspx
>homepage.aspx codebehind is compiled into the mywebapp.dll and is using uti
l.dll
>if i make changes to util.dll project and want to compile it now, the dll i
s in use and can't be build again.
>if i make changes to my homepage.aspx codebehind and compile it to mywebapp
.dll - there is no problem.
>this behavior is unaccepted and it is urgent for me to solve this.
>
>
>"wl" <nospam@.nospam> wrote in message news:OYWBjDV0EHA.2688@.TK2MSFTNGP09.ph
x.gbl...
> I assume you mean that the codebehind ASP.NET DLL is in use after the fir
st time the DLL is triggered by requested the corresponding page from the II
S server ?
> For performance reasons (amongst others), an ASP.NET DLL gets loaded the
first time it is needed and it stays loaded.
> You can unload (or change the way the loading is done) by using the "Inte
rnet Information Services" applet ("Application Protection" and "Unload")
> Wim
>
> "z. f." <zigi@.info-scopeREMSPAM.co.il> wrote in message news:utsg31T0EH
A.1524@.TK2MSFTNGP09.phx.gbl...
> Hi,
> i have an ASP.NET project that is using a (Class Library Project) VB.NE
T DLL.
> for some reason after running some pages on the web server, and trying
to compile the Class Library DLL, it can't compile because the DLL is in use
(and the PDB too), and the w3wp.exe process is the process locking the DLL
(as viewed with Sysinternals - Process Explorer).
> this is a huge problem. i need to do IIS reset in order to free the DLL
!
> 1. why is the w3wp.exe process is locking a class library dll and not l
ocking the asp.net DLL?
> 2. what will be in production environment, if i have to stop the web se
rver in order to replace the DLL, it is unacceptable.
> 3. with asp-dot-net DLLs i only have to replace the DLL and the web ser
ver is updated. now with shared Class Library project I should have more pro
blems?
>
> please help it's urgent.
> TIA, z.
Ah, yes. I believe ASP.NET will only shadow copy assemblies in the bin
directory. All other assebmlies are loaded into the process from the
original location and would be locked.
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 23 Nov 2004 16:49:27 +0200, "z. f."
<zigi@.info-scopeREMSPAM.co.il> wrote:

>i don't use the GAC, but in order to solve the problem of DLL copies all ar
ound i use a codebase hint in the web.config of my web application. in order
to do this i assign a strong name to the DLL and a fix version number.
>should this cause any problem with locking the DLL differently from the def
ault way?
>
> "Scott Allen" <bitmask@.[nospam].fred.net> wrote in message news:42i6q091j66ksfbqk
pqrejn3h11o85npri@.4ax.com...
> I'm assuming your not using the GAC, right?
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/
>
so if i put it in the GAC will it also be locked?
or is there an attribute in the configuration near the codebase hint to ask
the framework to "Shadow" copy the DLL?
"Scott Allen" <bitmask@.[nospam].fred.net> wrote in message news:rel6q0hcrpdequrbg52i
2ilaitv43k2fbv@.4ax.com...
Ah, yes. I believe ASP.NET will only shadow copy assemblies in the bin
directory. All other assebmlies are loaded into the process from the
original location and would be locked.
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 23 Nov 2004 16:49:27 +0200, "z. f."
<zigi@.info-scopeREMSPAM.co.il> wrote:

>i don't use the GAC, but in order to solve the problem of DLL copies all ar
ound i use a codebase hint in the web.config of my web application. in order
to do this i assign a strong name to the DLL and a fix version number.
>should this cause any problem with locking the DLL differently from the def
ault way?
>
> "Scott Allen" <bitmask@.[nospam].fred.net> wrote in message news:42i6q091j66ksfbqk
pqrejn3h11o85npri@.4ax.com...
> I'm assuming your not using the GAC, right?
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/
>
I have not tried this, but you might be able to modify the
ShadowCopyDirectories property of the appdomain to include your custom
path, ie:
AppDomain.CurrentDomain.SetShadowCopyPath(
AppDomain.CurrentDomain.SetupInformation.ShadowCopyDirectories +
";" +
"[CustomPath]"
);
Again, I have not tried this, but let me know if you do or do not get
it working, I might investigate some more this evening.
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 23 Nov 2004 17:52:07 +0200, "z. f."
<zigi@.info-scopeREMSPAM.co.il> wrote:

>so if i put it in the GAC will it also be locked?
>or is there an attribute in the configuration near the codebase hint to ask
the framework to "Shadow" copy the DLL?
>
Of course this would have to happen before the web app tries to load
the assembly...
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 23 Nov 2004 11:53:30 -0500, Scott Allen
<bitmask@.[nospam].fred.net> wrote:

>I have not tried this, but you might be able to modify the
>ShadowCopyDirectories property of the appdomain to include your custom
>path, ie:
>AppDomain.CurrentDomain.SetShadowCopyPath(
> AppDomain.CurrentDomain.SetupInformation.ShadowCopyDirectories +
> ";" +
> "[CustomPath]"
> );
>
>Again, I have not tried this, but let me know if you do or do not get
>it working, I might investigate some more this evening.
thanx, you just made my day!
"Scott Allen" <bitmask@.[nospam].fred.net> wrote in message news:jlu6q0l59a8l4itucrtt
i4r011k8bpm97l@.4ax.com...
Of course this would have to happen before the web app tries to load
the assembly...
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 23 Nov 2004 11:53:30 -0500, Scott Allen
<bitmask@.[nospam].fred.net> wrote:

>I have not tried this, but you might be able to modify the
>ShadowCopyDirectories property of the appdomain to include your custom
>path, ie:
>AppDomain.CurrentDomain.SetShadowCopyPath(
> AppDomain.CurrentDomain.SetupInformation.ShadowCopyDirectories +
> ";" +
> "[CustomPath]"
> );
>
>Again, I have not tried this, but let me know if you do or do not get
>it working, I might investigate some more this evening.

0 comments:

Post a Comment