473,385 Members | 1,912 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,385 software developers and data experts.

Server wide objects

I want to share my .net objects amongst several websites on the same server. Can anyone direct me to an article or information on how to do this. I created a namespace with all of my classes and us it each bin directory for each site. It is a pain to do updates. What would be the correct terminology?
Nov 18 '05 #1
5 984
"Chris Glenn" <Chris Gl***@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
I want to share my .net objects amongst several websites on the same

server. Can anyone direct me to an article or information on how to do this.
I created a namespace with all of my classes and us it each bin directory
for each site. It is a pain to do updates. What would be the correct
terminology?

I don't believe there's a way to do this. Each web application runs in its
own AppDomain and can't simply "share" objects with another.

The best you could do would be to persist your object in a database and
synchronize changes to it.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #2
simply create the objects you want to share in seperate projects. Compile them to a dll and add references from your projects.
"Chris Glenn" wrote:
I want to share my .net objects amongst several websites on the same server. Can anyone direct me to an article or information on how to do this. I created a namespace with all of my classes and us it each bin directory for each site. It is a pain to do updates. What would be the correct terminology?

Nov 18 '05 #3
> I don't believe there's a way to do this.

Well, there is one way. You can put the classes into the Global Assembly
Cache. However, this is problematic. Unless you use versioning, updating the
DLLs requires a reboot of the machine to "take." If you use versioning, you
can put multiple versions of the same class into the GAC without rebooting,
but you then have to refer to the correct version in the client application,
which negates the convenience of not having to update each app.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:Os*************@TK2MSFTNGP12.phx.gbl...
"Chris Glenn" <Chris Gl***@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
I want to share my .net objects amongst several websites on the same server. Can anyone direct me to an article or information on how to do

this. I created a namespace with all of my classes and us it each bin directory
for each site. It is a pain to do updates. What would be the correct
terminology?

I don't believe there's a way to do this. Each web application runs in its
own AppDomain and can't simply "share" objects with another.

The best you could do would be to persist your object in a database and
synchronize changes to it.
--
John Saunders
johnwsaundersiii at hotmail

Nov 18 '05 #4
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:uL**************@tk2msftngp13.phx.gbl...
I don't believe there's a way to do this.
Well, there is one way. You can put the classes into the Global Assembly
Cache. However, this is problematic. Unless you use versioning, updating

the DLLs requires a reboot of the machine to "take." If you use versioning, you can put multiple versions of the same class into the GAC without rebooting, but you then have to refer to the correct version in the client application, which negates the convenience of not having to update each app.


Kevin, the OP spoke of "objects", not of "classes". Classes and other types
can be shared through the GAC, but instances of those types can't be shared
across ASP.NET applications, at least not in a simple manner.

Now, to do it in a less-simple manner, we have to break out of the box, so
to speak. Instead of sharing objects across ASP.NET applications, share them
amongst ASP.NET applications. Remove the objects from the ASP.NET
environment into some other process and then use remoting from ASP.NET to
access them.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #5
Hi John,

Of course, you're right. However, he did mention that he was copying DLLs
into multiple bin folders, which seems to indicate to me at least, that he
wasn't using the correct terminology (kind of common around here!), and
meant that he wanted to use the same classes, rather than sharing objects.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:Ol**************@tk2msftngp13.phx.gbl...
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:uL**************@tk2msftngp13.phx.gbl...
I don't believe there's a way to do this.
Well, there is one way. You can put the classes into the Global Assembly
Cache. However, this is problematic. Unless you use versioning, updating

the
DLLs requires a reboot of the machine to "take." If you use versioning,

you
can put multiple versions of the same class into the GAC without

rebooting,
but you then have to refer to the correct version in the client

application,
which negates the convenience of not having to update each app.


Kevin, the OP spoke of "objects", not of "classes". Classes and other

types can be shared through the GAC, but instances of those types can't be shared across ASP.NET applications, at least not in a simple manner.

Now, to do it in a less-simple manner, we have to break out of the box, so
to speak. Instead of sharing objects across ASP.NET applications, share them amongst ASP.NET applications. Remove the objects from the ASP.NET
environment into some other process and then use remoting from ASP.NET to
access them.
--
John Saunders
johnwsaundersiii at hotmail

Nov 18 '05 #6

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

Similar topics

0
by: Phillip J. Eby | last post by:
PEP: 333 Title: Python Web Server Gateway Interface v1.0 Version: $Revision: 1.1 $ Last-Modified: $Date: 2004/08/27 17:30:09 $ Author: Phillip J. Eby <pje at telecommunity.com> Discussions-To:...
0
by: Edward | last post by:
Here is the architecture for the Transactional Replication: SERVER1 - PUBLISHER - Also acts as back-end database for Enterprise-wide application written in VB. Uses ~430 stored procedures. ...
3
by: Jonathan Mcdougall | last post by:
I started using boost's filesystem library a couple of days ago. In its FAQ, it states "Wide-character names would provide an illusion of portability where portability does not in fact exist....
15
by: Steve | last post by:
Hi, I've been charged with investigating the possibilities of internationalizing our C++ libraries. std::strings are used all over the place, and unfortunately a mixture of...
0
by: brewhaha | last post by:
Greetings from the fifty-second parallel, My Sirs and Madams of Edmonton Public Library, the World Wide Web Consortium situated primarily at Michigan I.T., and Edmonton Community Network. To fail...
7
by: [Gauthier] | last post by:
Hello, I've a simple question: On a server that run multiple asp.net HttpApplication, is there any way with the asp.net framework to exchange data between different application? I basically...
11
by: Sanjay | last post by:
Probably a newcomer question, but I could not find a solution. I am trying to have some singleton global objects like "database connection" or "session" shared application wide. Trying hard, I...
2
by: walterbyrd | last post by:
Can somebody help me understand the difference? Not just where Python is concerned, but in general? As I understand it, an application server is supposed to be a great help in developing apps,...
8
by: Tony Toews [MVP] | last post by:
Thanks to a posting by fellow MVP Steve Foster On a computer that is running Windows Vista, Windows Server 2008, or Windows XP, an incorrect value is returned when an application queries the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.