I have created a component (called DataAccess) using com+ service for
retrieving data from database. When I reference it to other projects, I
notice that it is copied in to the bin folder of each project. And after
all the projects run, under component service/computer/mycomputer/com+
applications, I see DataAccess app, and under it, there are several
DataAccess components running, I assume 1 component for each project. How
can I reference all the projects to only one dll and to have one instance of
it running (don't know if it's better than several instance ?). For
example, I like to have my web structure like
C:
- inetpub
--sharedDll //the shared dll should be in this folder
--wwwroot
--project1
--project2
--project3
thanks 5 1279
In article <#6*************@TK2MSFTNGP10.phx.gbl>, mh****@hotmail.com
says... I have created a component (called DataAccess) using com+ service for retrieving data from database.
So this is a strong-named assembly and you've installed it into the
Global Assembly Cache (gac)?
When I reference it to other projects, I notice that it is copied in to the bin folder of each project. And after all the projects run, under component service/computer/mycomputer/com+ applications, I see DataAccess app, and under it, there are several DataAccess components running, I assume 1 component for each project.
Probably.
How can I reference all the projects to only one dll and to have one instance of it running (don't know if it's better than several instance ?).
Well, if your assembly is in the GAC, you're only using one DLL. And if
you only want one instance running, that's a design decision (it's
called a "singleton" design pattern). If you haven't designed it to
only have one copy running, you'll have some redesign work to do.
There's no harm in having more than one running. That's one of the
benefits of COM+. It will handle the object instantiation for you and
will reuse an existing object if it's not being used by anyone (saves
time since the object doesn't have to be instantiated).
--
Patrick Steele
Microsoft .NET MVP http://weblogs.asp.net/psteele
Thanks Patrick,
it is strong name assembly, but I didn't install it into GAC. How to
install it into GAC?.
"Patrick Steele [MVP]" <pa*****@mvps.org> wrote in message
news:MP************************@msnews.microsoft.c om... In article <#6*************@TK2MSFTNGP10.phx.gbl>, mh****@hotmail.com says... I have created a component (called DataAccess) using com+ service for retrieving data from database.
So this is a strong-named assembly and you've installed it into the Global Assembly Cache (gac)?
When I reference it to other projects, I notice that it is copied in to the bin folder of each project. And
after all the projects run, under component service/computer/mycomputer/com+ applications, I see DataAccess app, and under it, there are several DataAccess components running, I assume 1 component for each project.
Probably.
How can I reference all the projects to only one dll and to have one
instance of it running (don't know if it's better than several instance ?).
Well, if your assembly is in the GAC, you're only using one DLL. And if you only want one instance running, that's a design decision (it's called a "singleton" design pattern). If you haven't designed it to only have one copy running, you'll have some redesign work to do.
There's no harm in having more than one running. That's one of the benefits of COM+. It will handle the object instantiation for you and will reuse an existing object if it's not being used by anyone (saves time since the object doesn't have to be instantiated).
-- Patrick Steele Microsoft .NET MVP http://weblogs.asp.net/psteele
In article <us**************@TK2MSFTNGP10.phx.gbl>, mh****@hotmail.com
says... Thanks Patrick,
it is strong name assembly, but I didn't install it into GAC. How to install it into GAC?.
You can either use the .NET Framework utility (Start, Programs,
Administrative Tools, .NET Framework Configuration) or go to a VS.NET
2003 command prompt and enter:
gacutil /i <dllname>.dll
--
Patrick Steele
Microsoft .NET MVP http://weblogs.asp.net/psteele
but it doesn't solve the problem that it copies the dll into each
application bin folder
"Patrick Steele [MVP]" <pa*****@mvps.org> wrote in message
news:MP************************@msnews.microsoft.c om... In article <us**************@TK2MSFTNGP10.phx.gbl>, mh****@hotmail.com says... Thanks Patrick,
it is strong name assembly, but I didn't install it into GAC. How to install it into GAC?.
You can either use the .NET Framework utility (Start, Programs, Administrative Tools, .NET Framework Configuration) or go to a VS.NET 2003 command prompt and enter:
gacutil /i <dllname>.dll
-- Patrick Steele Microsoft .NET MVP http://weblogs.asp.net/psteele
You can right click on the Library Name under the References, choose
Properties and set the copy Local Property to False.
HTH
Trevor Benedict R
MCSD
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: John Brock |
last post by:
I have a base class with several derived classes (I'm writing in
VB.NET). I want each derived class to have a unique class ID (a
String), and I want the derived classes to inherit from the base...
|
by: BadPony |
last post by:
Anyone using Peoplesoft on a Federated UDB
(shared nothing)Environment on Open System Platforms?
Preferably AIX, but any war stories would be good.
TEA
EB-C
|
by: darrel |
last post by:
I'm still trying to sort out in my head the differences between public and
shared when referring to declaring properties or variables. This is my
understanding:
shared - akin to a 'global'...
|
by: Henri |
last post by:
Hi,
I'm using a custom class in my ASP.NET which has a Shared property.
I don't want this Shared property to be shared between users because of
thread concurrent accesses problems.
I just want it...
|
by: tshad |
last post by:
I have a program I am trying to compile into a dll and am getting a bunch
of: the following errors:
error BC30469: Reference to a non-shared member requires an object
reference.
At first, I...
|
by: tshad |
last post by:
I am setting up some of my functions in a class called MyFunctions.
I am not clear as to the best time to set a function as Shared and when not
to. For example, I have the following bit...
|
by: Rob Nicholson |
last post by:
A consequence of the ASP.NET architecture on IIS has just hit home with a
big thud. It's to do with shared variables. Consider a module like this:
Public Module Functions
Public GlobalName As...
|
by: Erik Cruz |
last post by:
Hello!
I have read some threads discussing the fact that a module is in reality a
shared class. If I try to create a Public Shared Class in vb.net I receive a
compile error. Why? If I can't...
|
by: Simon |
last post by:
Hi all,
We have an ASP.NET 1.1 application running on IIS6 on Server 2003.
Most of the base objects we are using in this application are taken from a
windows application also written by us. We...
|
by: eBob.com |
last post by:
I have this nasty problem with Shared methods and what I think of as "global
storage" - i.e. storage declared outside of any subroutines or functions.
In the simple example below this "global"...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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,...
| |