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

How to share a set of classes from two IIS web sites?

Hi:

I have two web sites in my IIS. I want them to share or use one set of
classes that I created, because they have same functions that the classses
provide. And maybe in the future I will create more web sites to use the set
of classes. But I don't know how to do this. Where do I need to put the set
of classes? Do I have to make them be DLLs?

Thanks

Q.
Nov 18 '05 #1
4 1583
If you want to share the physical assemblies as opposed to sharing the
data that they contain you could simply install them into the GAC. This
way you'd only have to deploy the assemblies once and reference them
from each project. Hope that helps.

Have A Better One!

John M Deal, MCP
Necessity Software

Quentin Huo wrote:
Hi:

I have two web sites in my IIS. I want them to share or use one set of
classes that I created, because they have same functions that the classses
provide. And maybe in the future I will create more web sites to use the set
of classes. But I don't know how to do this. Where do I need to put the set
of classes? Do I have to make them be DLLs?

Thanks

Q.

Nov 18 '05 #2
Hi,

Thank you very much!

I am a novice on .net. Can you tell me what the GAC is? And if possible, can
you introduce me some websites or materials that talking about how to do it?

Thanks

Q.

"John M Deal" <jo******@necessitysoftware.com> wrote in message
news:eW**************@TK2MSFTNGP15.phx.gbl...
If you want to share the physical assemblies as opposed to sharing the
data that they contain you could simply install them into the GAC. This
way you'd only have to deploy the assemblies once and reference them from
each project. Hope that helps.

Have A Better One!

John M Deal, MCP
Necessity Software

Quentin Huo wrote:
Hi:

I have two web sites in my IIS. I want them to share or use one set of
classes that I created, because they have same functions that the
classses provide. And maybe in the future I will create more web sites to
use the set of classes. But I don't know how to do this. Where do I need
to put the set of classes? Do I have to make them be DLLs?

Thanks

Q.

Nov 18 '05 #3
The GAC is the Global Assembly Cache. It's primary purpose is to provide
a shared location where assemblies can be stored for reference by
multiple applications. For example the assemblies that contain the core
classes of .Net (like System, System.Data, ...) are stored there. I
don't know of any "good" references but Microsoft has a number of decent
articles that can point you in the right direction and there are plenty
of articles online for this. The two things I'd recommend searching for
are "Global Assembly Cache" and "Strong Name" (the latter is necessary
for the former).

Here's a couple of links you can get started with:

http://support.microsoft.com/kb/815808
http://www.microsoft.com/resources/d...emblycache.asp
http://msdn.microsoft.com/library/de...emblycache.asp

Have A Better One!

John M Deal, MCP
Necessity Software

Quentin Huo wrote:
Hi,

Thank you very much!

I am a novice on .net. Can you tell me what the GAC is? And if possible, can
you introduce me some websites or materials that talking about how to do it?

Thanks

Q.

"John M Deal" <jo******@necessitysoftware.com> wrote in message
news:eW**************@TK2MSFTNGP15.phx.gbl...
If you want to share the physical assemblies as opposed to sharing the
data that they contain you could simply install them into the GAC. This
way you'd only have to deploy the assemblies once and reference them from
each project. Hope that helps.

Have A Better One!

John M Deal, MCP
Necessity Software

Quentin Huo wrote:
Hi:

I have two web sites in my IIS. I want them to share or use one set of
classes that I created, because they have same functions that the
classses provide. And maybe in the future I will create more web sites to
use the set of classes. But I don't know how to do this. Where do I need
to put the set of classes? Do I have to make them be DLLs?

Thanks

Q.


Nov 18 '05 #4
the best way is build dll(s), and add a reference to them in the second
project. VS will then copy them to the local bin. avoid installing them in
the GAC as this is not the best practice (as it make support/updates more
difficult, and leads back to dll hell). you can also make a seperate project
out of the dll and share the project between web apps (this is source code
sharing).

-- brice (sqlwork.com)

"Quentin Huo" <q.***@manyworlds.com> wrote in message
news:u3**************@TK2MSFTNGP12.phx.gbl...
| Hi:
|
| I have two web sites in my IIS. I want them to share or use one set of
| classes that I created, because they have same functions that the
classses
| provide. And maybe in the future I will create more web sites to use the
set
| of classes. But I don't know how to do this. Where do I need to put the
set
| of classes? Do I have to make them be DLLs?
|
| Thanks
|
| Q.
|
|
Nov 18 '05 #5

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

Similar topics

17
by: Phil Powell | last post by:
Where can I find an online PHP form validator script library to use? I have tried hacking the one here at work for weeks now and it's getting more and more impossible to customize, especially now...
23
by: John Bailo | last post by:
I build an NT service using the FileSystemWatcher() class to detect when new files arrive at our ftp server. Now I want to configure it to watch for files on someone else's remote server. ...
346
by: rkusenet | last post by:
http://biz.yahoo.com/rc/040526/tech_database_marketshare_1.html Interesting to see that database sales for windows is more than Unix.
0
by: Tom | last post by:
Hello friends I have 2 webs sites on same domain say http://app1.mydomain.com http://app2.mydomain.com App1 use custom validation, via a custom login page user can enter their WinNT...
2
by: Sam-I-Am | last post by:
Hi There I have multiple asp.net web apps that all make use of a common set of sql data. I currently have each application cache this data using the cache api. As the data is same for all...
3
by: musosdev | last post by:
Hi guys Okay, I've setup my projects to open and compile fine in VS2005 using FPSE and remote web, but it's *really* slow. So I thought I'd have a go at doing it the normal way, by loading from...
3
by: Bob Peek | last post by:
I would like to share code between several web sites that exist as virtual directories under a single site. It appears that I have to create an app_code directory under each virtual root in order...
6
by: Immortal Nephi | last post by:
First class is the base class. It has two data: m_Base1 and m_Base2. Second class and third class are derived classes and they are derived from first class. m_Base1 and m_Base2 are inherited into...
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
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?
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
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
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...
0
tracyyun
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 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.