PC Review


Reply
Thread Tools Rate Thread

DLL Lock Issue

 
 
Programmer
Guest
Posts: n/a
 
      9th Dec 2004
Hi everyone



Well here is my problem

I hope you can help me



I have a web application. My web application is 4 different dlls

1. The First DLL is a Class library with shared routines and staff like that
(VB Project)

2. The Second DLL is an ASP .Net application and it's the shell let's say.
It has some basics screens and from there you can build all the layout of
the application

3. The Third DLL is a DLL with web services

4. The Last DLL is an ASP .Net application also. Is a different application
and is loaded from the 2nd DLL. This Application uses an other database and
has its own components created.



The Second, Third and Forth DLL have a reference to the First DLL. (Project
Reference)





The Physical Path of the Application Looks Like This



Web Application (Directory)

|-\Bin (First & Second DLL)

| Web.Config File

|

|-\Services (Directory)

| |-\bin(Third Dll)

| | Web.Config File for Loading the Assembly

|

|-\Project (Directory)

|-\bin(Forth DLL)

| Web.Config file for loading the Assembly



Now I hope you have understand the structure.

The Problem is that now we are developing the Forth DLL and some times when
we make some changes only in the DLL we can not copy the new DLL on the web
servers because it's been used by an other process (Windows Message).



When we insert the DLL on the Web Application Bin Directory and delete the
Project Web.Config File that loads the assembly we can do what ever we want.
Delete the DLL , Copy a new DLL in the Directory etc.



Can any one help me ??

The structure we are using now is the correct



The Web.Config Of the Web Application looks like this one





<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<probing privatePath="Project/bin;bin;services/bin; " />

</assemblyBinding>

</runtime>

<system.web>

<compilation defaultLanguage="vb" debug="true">

<assemblies></assemblies>

</compilation>

</system.web>



And the Web.Config Inside the Project Directory Looks like this

<system.web>

<compilation defaultLanguage="vb" debug="true">

<assemblies>

<add assembly="DLI" />

</assemblies>

</compilation>

<system.web>



What can I do to fix the problem??

We need to upload new DLL fro the Project often. It's not a good idea to
upload the entire "Web Application" and create a new version. Some times we
need to do small, and also the cost of uploading is enormous.

And also I need the production environment to be exactly the same as the
development environment. It's not a solution to build the Project and then
manually copy the DLL from the Project\Bin Folder to the Web Application\Bin
Folder



Thank you all










 
Reply With Quote
 
 
 
 
Programmer
Guest
Posts: n/a
 
      9th Dec 2004
Sorry i have make an spelling error
The Web.Config Inside the Project Directory Looks like this

<system.web>

<compilation defaultLanguage="vb" debug="true">

<assemblies>

<add assembly="Project" />

</assemblies>

</compilation>

<system.web>

The Assembly has the corrent name
I have just write it wrongly were
The assembly is loaded correctly.

Thank you
Dimitris

"Programmer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi everyone
>
>
>
> Well here is my problem
>
> I hope you can help me
>
>
>
> I have a web application. My web application is 4 different dlls
>
> 1. The First DLL is a Class library with shared routines and staff like

that
> (VB Project)
>
> 2. The Second DLL is an ASP .Net application and it's the shell let's say.
> It has some basics screens and from there you can build all the layout of
> the application
>
> 3. The Third DLL is a DLL with web services
>
> 4. The Last DLL is an ASP .Net application also. Is a different

application
> and is loaded from the 2nd DLL. This Application uses an other database

and
> has its own components created.
>
>
>
> The Second, Third and Forth DLL have a reference to the First DLL.

(Project
> Reference)
>
>
>
>
>
> The Physical Path of the Application Looks Like This
>
>
>
> Web Application (Directory)
>
> |-\Bin (First & Second DLL)
>
> | Web.Config File
>
> |
>
> |-\Services (Directory)
>
> | |-\bin(Third Dll)
>
> | | Web.Config File for Loading the Assembly
>
> |
>
> |-\Project (Directory)
>
> |-\bin(Forth DLL)
>
> | Web.Config file for loading the Assembly
>
>
>
> Now I hope you have understand the structure.
>
> The Problem is that now we are developing the Forth DLL and some times

when
> we make some changes only in the DLL we can not copy the new DLL on the

web
> servers because it's been used by an other process (Windows Message).
>
>
>
> When we insert the DLL on the Web Application Bin Directory and delete the
> Project Web.Config File that loads the assembly we can do what ever we

want.
> Delete the DLL , Copy a new DLL in the Directory etc.
>
>
>
> Can any one help me ??
>
> The structure we are using now is the correct
>
>
>
> The Web.Config Of the Web Application looks like this one
>
>
>
>
>
> <runtime>
>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
>
> <probing privatePath="Project/bin;bin;services/bin; " />
>
> </assemblyBinding>
>
> </runtime>
>
> <system.web>
>
> <compilation defaultLanguage="vb" debug="true">
>
> <assemblies></assemblies>
>
> </compilation>
>
> </system.web>
>
>
>
> And the Web.Config Inside the Project Directory Looks like this
>
> <system.web>
>
> <compilation defaultLanguage="vb" debug="true">
>
> <assemblies>
>
> <add assembly="DLI" />
>
> </assemblies>
>
> </compilation>
>
> <system.web>
>
>
>
> What can I do to fix the problem??
>
> We need to upload new DLL fro the Project often. It's not a good idea to
> upload the entire "Web Application" and create a new version. Some times

we
> need to do small, and also the cost of uploading is enormous.
>
> And also I need the production environment to be exactly the same as the
> development environment. It's not a solution to build the Project and then
> manually copy the DLL from the Project\Bin Folder to the Web

Application\Bin
> Folder
>
>
>
> Thank you all
>
>
>
>
>
>
>
>
>
>



 
Reply With Quote
 
Scott Allen
Guest
Posts: n/a
 
      9th Dec 2004
The shadow copy feature of ASP.NET is only enabled for the bin
subdirectory. Shadow copy is a feature that copies the dll to a
temporary location before loading into an appdomain, thus avoiding a
lock on the original dll.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 9 Dec 2004 10:46:19 +0200, "Programmer"
<(E-Mail Removed)> wrote:

>Hi everyone
>
>
>
>Well here is my problem
>
>I hope you can help me
>
>
>
>I have a web application. My web application is 4 different dlls
>
>1. The First DLL is a Class library with shared routines and staff like that
>(VB Project)
>
>2. The Second DLL is an ASP .Net application and it's the shell let's say.
>It has some basics screens and from there you can build all the layout of
>the application
>
>3. The Third DLL is a DLL with web services
>
>4. The Last DLL is an ASP .Net application also. Is a different application
>and is loaded from the 2nd DLL. This Application uses an other database and
>has its own components created.
>
>
>
>The Second, Third and Forth DLL have a reference to the First DLL. (Project
>Reference)
>
>
>
>
>
>The Physical Path of the Application Looks Like This
>
>
>
>Web Application (Directory)
>
> |-\Bin (First & Second DLL)
>
> | Web.Config File
>
> |
>
> |-\Services (Directory)
>
> | |-\bin(Third Dll)
>
> | | Web.Config File for Loading the Assembly
>
> |
>
> |-\Project (Directory)
>
> |-\bin(Forth DLL)
>
> | Web.Config file for loading the Assembly
>
>
>
>Now I hope you have understand the structure.
>
>The Problem is that now we are developing the Forth DLL and some times when
>we make some changes only in the DLL we can not copy the new DLL on the web
>servers because it's been used by an other process (Windows Message).
>
>
>
>When we insert the DLL on the Web Application Bin Directory and delete the
>Project Web.Config File that loads the assembly we can do what ever we want.
>Delete the DLL , Copy a new DLL in the Directory etc.
>
>
>
>Can any one help me ??
>
>The structure we are using now is the correct
>
>
>
>The Web.Config Of the Web Application looks like this one
>
>
>
>
>
><runtime>
>
><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
>
> <probing privatePath="Project/bin;bin;services/bin; " />
>
> </assemblyBinding>
>
></runtime>
>
><system.web>
>
><compilation defaultLanguage="vb" debug="true">
>
> <assemblies></assemblies>
>
> </compilation>
>
></system.web>
>
>
>
>And the Web.Config Inside the Project Directory Looks like this
>
><system.web>
>
> <compilation defaultLanguage="vb" debug="true">
>
> <assemblies>
>
> <add assembly="DLI" />
>
> </assemblies>
>
> </compilation>
>
><system.web>
>
>
>
>What can I do to fix the problem??
>
>We need to upload new DLL fro the Project often. It's not a good idea to
>upload the entire "Web Application" and create a new version. Some times we
>need to do small, and also the cost of uploading is enormous.
>
>And also I need the production environment to be exactly the same as the
>development environment. It's not a solution to build the Project and then
>manually copy the DLL from the Project\Bin Folder to the Web Application\Bin
>Folder
>
>
>
>Thank you all
>
>
>
>
>
>
>
>
>


 
Reply With Quote
 
Nick Malik
Guest
Posts: n/a
 
      9th Dec 2004
what is the error, Dimitris?

When you delete web.config, your web application is notified. It will
unload all dlls and wait for a calling app to request a resource before
loading them up again. This allows you to update your dll.

This is pretty normal behavior.

If you want to be able to update a DLL "on the fly" then you will want to
provide the name of the DLL in the web.config and use reflection to load it.
THat way, you can install a new DLL WITH A NEW NAME into the web directory,
and then just replace the web.config file with an updated file, which has
the effect of unloading the old dlls. When your app wants the resources, it
checks the web.config for the name of the dll to load. Since a new name
will be provided, you can load the new one.

Hope this helps,
--- Nick

"Programmer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Sorry i have make an spelling error
> The Web.Config Inside the Project Directory Looks like this
>
> <system.web>
>
> <compilation defaultLanguage="vb" debug="true">
>
> <assemblies>
>
> <add assembly="Project" />
>
> </assemblies>
>
> </compilation>
>
> <system.web>
>
> The Assembly has the corrent name
> I have just write it wrongly were
> The assembly is loaded correctly.
>
> Thank you
> Dimitris
>
> "Programmer" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi everyone
> >
> >
> >
> > Well here is my problem
> >
> > I hope you can help me
> >
> >
> >
> > I have a web application. My web application is 4 different dlls
> >
> > 1. The First DLL is a Class library with shared routines and staff like

> that
> > (VB Project)
> >
> > 2. The Second DLL is an ASP .Net application and it's the shell let's

say.
> > It has some basics screens and from there you can build all the layout

of
> > the application
> >
> > 3. The Third DLL is a DLL with web services
> >
> > 4. The Last DLL is an ASP .Net application also. Is a different

> application
> > and is loaded from the 2nd DLL. This Application uses an other database

> and
> > has its own components created.
> >
> >
> >
> > The Second, Third and Forth DLL have a reference to the First DLL.

> (Project
> > Reference)
> >
> >
> >
> >
> >
> > The Physical Path of the Application Looks Like This
> >
> >
> >
> > Web Application (Directory)
> >
> > |-\Bin (First & Second DLL)
> >
> > | Web.Config File
> >
> > |
> >
> > |-\Services (Directory)
> >
> > | |-\bin(Third Dll)
> >
> > | | Web.Config File for Loading the Assembly
> >
> > |
> >
> > |-\Project (Directory)
> >
> > |-\bin(Forth DLL)
> >
> > | Web.Config file for loading the Assembly
> >
> >
> >
> > Now I hope you have understand the structure.
> >
> > The Problem is that now we are developing the Forth DLL and some times

> when
> > we make some changes only in the DLL we can not copy the new DLL on the

> web
> > servers because it's been used by an other process (Windows Message).
> >
> >
> >
> > When we insert the DLL on the Web Application Bin Directory and delete

the
> > Project Web.Config File that loads the assembly we can do what ever we

> want.
> > Delete the DLL , Copy a new DLL in the Directory etc.
> >
> >
> >
> > Can any one help me ??
> >
> > The structure we are using now is the correct
> >
> >
> >
> > The Web.Config Of the Web Application looks like this one
> >
> >
> >
> >
> >
> > <runtime>
> >
> > <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
> >
> > <probing privatePath="Project/bin;bin;services/bin; " />
> >
> > </assemblyBinding>
> >
> > </runtime>
> >
> > <system.web>
> >
> > <compilation defaultLanguage="vb" debug="true">
> >
> > <assemblies></assemblies>
> >
> > </compilation>
> >
> > </system.web>
> >
> >
> >
> > And the Web.Config Inside the Project Directory Looks like this
> >
> > <system.web>
> >
> > <compilation defaultLanguage="vb" debug="true">
> >
> > <assemblies>
> >
> > <add assembly="DLI" />
> >
> > </assemblies>
> >
> > </compilation>
> >
> > <system.web>
> >
> >
> >
> > What can I do to fix the problem??
> >
> > We need to upload new DLL fro the Project often. It's not a good idea to
> > upload the entire "Web Application" and create a new version. Some times

> we
> > need to do small, and also the cost of uploading is enormous.
> >
> > And also I need the production environment to be exactly the same as the
> > development environment. It's not a solution to build the Project and

then
> > manually copy the DLL from the Project\Bin Folder to the Web

> Application\Bin
> > Folder
> >
> >
> >
> > Thank you all
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DLL Lock Issue Programmer Microsoft Dot NET 4 10th Dec 2004 12:28 PM
DLL Lock Issue Programmer Microsoft ASP .NET 3 9th Dec 2004 03:45 PM
DLL Lock Issue Programmer Microsoft VB .NET 3 9th Dec 2004 03:45 PM
Issue with lock(this) { ... } Max Adams Microsoft C# .NET 4 22nd Oct 2004 08:04 AM
num lock issue Alex Saager Microsoft Windows 2000 Terminal Server Clients 2 5th Sep 2003 08:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:36 PM.