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

Deploying compiled Class File (dll) for website

Hi all,

I am still learning ASP.Net, and .Net in general. Though I feel I have much
of the "basics" down, I am running into some gray areas in more advanced
topics. My question is how I make sure that a class file (DLL) I wrote and
am using (via "Add Reference") on my development webserver still works
correctly when I copy all my files over to the production server. Do I need
to create the same folders on the production server as on the development
server and place the DLL there? Do I simply place the DLL on the production
server and .Net will find it? What I am trying to get at is under "classic"
ASP, I could simply do a REGSVR32 on the DLL and all my ASP apps could see
it. I would simply unreg and re-reg a newer version of the DLL and all was
updated. Now with .Net, if I need to use a .Net class file (DLL), how do
I/should I use it on the development server compared to the production
server so that once written and compiled that DLL is available to all
ASP.Net apps, but also that I can update that .Net DLL.

I hope I am making my question understandable. The whole point here is that
I want to use a DLL as my "business logic" layer rather than write the same
functions over and over in all my ASP.Net apps, and then run into problems
when I need to update those functions. By using a class file (DLL) I can
simply use my functions/methods from a common, central, location.

I look forward to your input, suggestions, and/or advice. Thanks in
advance!

-- Andrew
Nov 18 '05 #1
3 2136
Believe it or not, this is not an advanced topic, but a fundamental one.
..Net and COIM are completely different technologies, and work entirely
differently. COM DLLs and classes are registered in the System Registry,
where the location of the DLL is stored as well. .Net assemblies (DLLs) are
located by their location relative to the application using them, and are
usually located in a folder named "bin" directly under the application root
folder. .Net assemblies can also be registered in the Global Assembly Cache
(GAC), which works much like the System Registry for COM, meaning that any
..Net application can find them in the GAC. In essence, a .Net application
will search for the DLL in the bin folder, check the config files for other
locations under the bin folder, and also check the GAC.

Considering your level of expertise, your best bet would be to use the bin
folder, and simply copy your DLL to the bin folder under your deployed
application's root folder. You can use the same DLL in multiple ASP.Net apps
by making copies of it and placing them in the bin folders of each app.

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

"Andrew" <An********@hotmail.com> wrote in message
news:On**************@TK2MSFTNGP12.phx.gbl...
Hi all,

I am still learning ASP.Net, and .Net in general. Though I feel I have much of the "basics" down, I am running into some gray areas in more advanced
topics. My question is how I make sure that a class file (DLL) I wrote and am using (via "Add Reference") on my development webserver still works
correctly when I copy all my files over to the production server. Do I need to create the same folders on the production server as on the development
server and place the DLL there? Do I simply place the DLL on the production server and .Net will find it? What I am trying to get at is under "classic" ASP, I could simply do a REGSVR32 on the DLL and all my ASP apps could see
it. I would simply unreg and re-reg a newer version of the DLL and all was updated. Now with .Net, if I need to use a .Net class file (DLL), how do
I/should I use it on the development server compared to the production
server so that once written and compiled that DLL is available to all
ASP.Net apps, but also that I can update that .Net DLL.

I hope I am making my question understandable. The whole point here is that I want to use a DLL as my "business logic" layer rather than write the same functions over and over in all my ASP.Net apps, and then run into problems
when I need to update those functions. By using a class file (DLL) I can
simply use my functions/methods from a common, central, location.

I look forward to your input, suggestions, and/or advice. Thanks in
advance!

-- Andrew

Nov 18 '05 #2
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:O3*************@TK2MSFTNGP10.phx.gbl...
.. . .
You can use the same DLL in multiple ASP.Net apps by making
copies of it and placing them in the bin folders of each app.
Kevin,

Yes, indeed, you /can/ ...

I leave you to enjoy the "fun" that comes of trying make a change
to your "shared" assembly... just /which/ "version" is any given
application running? ;-)

Regards,
Phill W.
.. . . Big Things are made up of lots of (duplicated copies of) little Things.

Nov 18 '05 #3
Kevin,

I really appreciate the input here, and in doing so were able to answer
a couple smaller side questions I had runnin' round the brain. However, and
you are correct in my experience level, I can't help but see problems with
your suggested course of action....
I am writing a class file (using the VB.Net Class Library project) to
write a few classes that help with mundane tasks such as making database
connections, returning records, cleaning up strings, various extended
date/time arithmetic, pixels per text character, etc, so forth, and so on.
Now I could indeed place a copy of the compiled DLL in the ASP.Net app that
needs it. However, I am already at 40 web apps and counting, not to mention
any helper "background" applications that may run on the webserver also
needing the DLL. If I use a separate copy in each one, and I make an update
to the DLL, and if I miss just one... I certainly do not have any desire to
spend my time double-checking each and every copy out there for version
integrity. (Which I believe is what the other responder, Phil W. mentioned)
So, if you (or any others reading this) can help me understand how to
use DLLs in a way where all applications on a single server all use the
*same* copy of the DLL, I would be most appreciative.
Again, thank you for the help, but your suggestion is really what I am
trying to avoid. :)

-- Andrew
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:O3*************@TK2MSFTNGP10.phx.gbl...
Considering your level of expertise, your best bet would be to use the bin
folder, and simply copy your DLL to the bin folder under your deployed
application's root folder. You can use the same DLL in multiple ASP.Net apps by making copies of it and placing them in the bin folders of each app.

Nov 18 '05 #4

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

Similar topics

20
by: | last post by:
Back in the Old days, I compile a C++ executable, copy the dll's used by this executable to the same folder. Go to another computer, copy that folder locally, double click on the exe file and off...
10
by: Jeremy Ames | last post by:
I have created a web application that uses a custom control and a web service on my local system. I have gotten all of the bugs worked out on my local system and now it is time to move it to the...
10
by: Gerben van Loon | last post by:
Hi there, hope someone can help me on this: I'm planning to deploy several ASP.NET projects to a production server. Normally I used the "Project / Copy project" option in VS.NET, but to this...
12
by: Wardeaux | last post by:
All, Wanting to find a way to create web pages to add to my website without having to recompile the codebehind everytime I want to add a new one... Here's the deal: I have a web app that takes...
2
by: timsohn | last post by:
I am trying to deploy the most basic web service (Hello World) example to my website, but am having significant trouble doing so. Here is what I am doing: 1) Create a New Web Service in VS 2005...
2
by: John Kotuby | last post by:
Hello all, Note: This is the full version of a Post that I inadvertently sent before it was complete. About a year ago I wrote a VB.NET 2003 solution that consists of a number of assemblies...
5
by: daokfella | last post by:
I'm still stuck on the .dll and bin folder mentality in 1.1. When deploying a 2.0 web application, there is no web .dll to deploy? So is this how we deploy in 2.0? 1. Copy the app_code folder...
8
by: =?Utf-8?B?V2hpc2tleVJvbWVv?= | last post by:
I am trying to copy files and folders onto a production machine (Windows 2003 web edition -- we had to install the .NetFramework 2.0 on it). I wasn't even sure which files to copy for a ASP.NET...
10
by: =?Utf-8?B?UmljaGFyZA==?= | last post by:
Hi, I usually deploy my ASP .NET application to the server by publishing, using Visual Studio 2005 publish feature. This creates the Bin folder on the server, with the compiled DLLs. I've...
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?
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
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...
0
agi2029
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,...

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.