473,395 Members | 1,647 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.

dotnet deployment in the real world

Hi,

Some quick background: Most of my experience with CGI has been with
Perl. We'd write perl scripts that shared custom modules where we'd put
all of our utility functions and OO code that could be re-used across
scripts. If we wanted to update a function in a module, we just updated
the module, and all scripts across the site instantly saw the changes.
No restarting IIS necessary.

With .net, I am trying to figure out how to best accomplish the same
type of thing. So far I am running into nothing but brick walls.

We have some class library assemblies (DLLs) we've written in .net,
which we want to be able to use from any asp.net program on our
webserver.

First thing I noticed is our asp.net programs default to making a copy
of these modules into their own folders. This destroys the reasoning
behind these modules -- we want any changes to the modules to be
reflected instantly across the server.

So then I looked into installing these modules as shared assemblies in
the GAC. But that requires you run the gacutil to update the GAC
whenever you make any changes. In our environment, we make many changes
a week to code, and having to run gacutil to freshen the cache every
time is tedious. But it is my understanding that even if we did do
that, we'd still have to restart IIS for the changes to be picked up by
the scripts. Apparantly .net only detects changed files if they are
private assemblies being used, not shared.

So next I looked into adding some configuration changes to the
<runtime> area of machine.config. For example,

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Our.Common" publicKeyToken="ae7d1e231700e31b"
/>
<codeBase version="1.0.0.0"
href="file:///D:\OurClassLibrary\Our.Common.DLL" />
</dependentAssembly>
</assemblyBinding>
</runtime>

Now, this basically works. It is like sharing an assembly in the GAC,
with the advantage that we can just upload the latest file to our
D:\OurClassLibrary folder.

However, in reality, it still has two problems:

1. Apparantly IIS locks the DLLs in that directory when it first loads
them, so you have to stop IIS to upload the latest changes!

2. Even if you didn't have the locking problem, you'd still have to
restart IIS for your .net apps to see the changes -- same as with the
GAC.

This seems completely insane to me. We can't be the only ones trying to
share our code across our web applications, and needing to make changes
frequently.

How does everyone else handle this problem?

Thanks!

Nov 22 '05 #1
3 1885


"Thomas" wrote:
Hi,

Some quick background: Most of my experience with CGI has been with
Perl. We'd write perl scripts that shared custom modules where we'd put
all of our utility functions and OO code that could be re-used across
scripts. If we wanted to update a function in a module, we just updated
the module, and all scripts across the site instantly saw the changes.
No restarting IIS necessary.

With .net, I am trying to figure out how to best accomplish the same
type of thing. So far I am running into nothing but brick walls.

We have some class library assemblies (DLLs) we've written in .net,
which we want to be able to use from any asp.net program on our
webserver.

First thing I noticed is our asp.net programs default to making a copy
of these modules into their own folders. This destroys the reasoning
behind these modules -- we want any changes to the modules to be
reflected instantly across the server.
Yes and no. From a global perspective, certainly, but remember that the
Global Assembly Cache is the solution for global assemblies. By copying, you
give the apps the ability to run on different versions of an assembly (until
you can get a specific application up to snuff on a particular assembly,
while other apps are already retooled).
So then I looked into installing these modules as shared assemblies in
the GAC. But that requires you run the gacutil to update the GAC
whenever you make any changes. In our environment, we make many changes
a week to code, and having to run gacutil to freshen the cache every
time is tedious. But it is my understanding that even if we did do
that, we'd still have to restart IIS for the changes to be picked up by
the scripts. Apparantly .net only detects changed files if they are
private assemblies being used, not shared.

So next I looked into adding some configuration changes to the
<runtime> area of machine.config. For example,

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Our.Common" publicKeyToken="ae7d1e231700e31b"
/>
<codeBase version="1.0.0.0"
href="file:///D:\OurClassLibrary\Our.Common.DLL" />
</dependentAssembly>
</assemblyBinding>
</runtime>

Now, this basically works. It is like sharing an assembly in the GAC,
with the advantage that we can just upload the latest file to our
D:\OurClassLibrary folder.

However, in reality, it still has two problems:

1. Apparantly IIS locks the DLLs in that directory when it first loads
them, so you have to stop IIS to upload the latest changes!

2. Even if you didn't have the locking problem, you'd still have to
restart IIS for your .net apps to see the changes -- same as with the
GAC.

This seems completely insane to me. We can't be the only ones trying to
share our code across our web applications, and needing to make changes
frequently.

How does everyone else handle this problem?

Thanks!


First, most shops do not change code at a stellar pace, so it is not
normally a major problem. The most common scenario, to solve the issue you
talk about, is setting up a web farm. Bring down one machine, update, bring
it up and switch. User requests get trafficed to the new machine after
deploy. This also gives you a high availability solution.

If you want to have a more robust drag and drop, you can use Component
Services (ie, COM+). There are a couple of issues:

1. For the flexibility of being able to quickly dump new assemblies, you end
up with some performance loss
2. You are using interop

The problem you speak of will be conquered, in one way, in the 2.0
Framework. The new code directory allows you to dump new source files and
have them compile. The negative is you want assemblies common to all
applications, and I am not certain the code directory can be a common
location (Not quite true, I am sure there is some way around this, but I do
not believe it is default).

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
Nov 22 '05 #2
Cowboy (Gregory A. Beamer) - MVP wrote:
The problem you speak of will be conquered, in one way, in the 2.0
Framework. The new code directory allows you to dump new source files and have them compile. The negative is you want assemblies common to all
applications, and I am not certain the code directory can be a common location (Not quite true, I am sure there is some way around this, but I do not believe it is default).


Hi Cowboy,

Thanks for the reply. I am disappointed that .NET seems to encourage
code copying rather than code sharing in live environments. It sounds
like people are either using web farms, or they are just copying their
libraries to all their individual apps. Sounds like a nightmare to
maintain.

I guess what I don't understand is why IIS doesn't detect changes in
the GAC just as it detects changes in the private application
directories? If that was fixed, it would be simple for us to roll out
updated class libraries that our apps could pick up instantly.

In regards to .NET 2.0, I cannot find anything describing this new
feature you are describing ("code directory"), or how exactly it might
help me reuse my code across our website rather than copying it
everywhere. Can you point me to a page that discusses this new feature?
Thanks,
Thomas

Nov 22 '05 #3
It seems as though one (hacky) solution is to kill aspnet_wp.exe after
uploading the latest DLLs into the GAC. Apparantly this is not as
destructive as restarting IIS. Are there downsides to doing this?

Nov 22 '05 #4

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

Similar topics

40
by: Eitan | last post by:
Hello, I know Java-Applet (written for JBuilder). I would like to know about dotnet technology, pros and cons in comparation to Java-Applet technololgy. Can I write a program in dotnet, like...
13
by: bill | last post by:
I am trying to convince a client that dotNet is preferable to an Access project (ADP/ADE). This client currently has a large, pure Access MDB solution with 30+ users, which needs to be upgraded....
2
by: meh | last post by:
Where can I find more info on setting up an installation. For example I have created my setup routines and the default stuff is working fine. but..... I need to give the user some options of what...
0
by: Andy | last post by:
Hey All, I'm a beginner with VB.Dotnet Deployment and I'm a little confused about some very basic deployment issues . . . I've now created some core assemblies that will be used throughout all...
1
by: Johnny Holland | last post by:
Hi there, We are trying to decide whether to go the ASP.NET route or the rich client route with no touch deployment as described in this article...
8
by: Bob | last post by:
It's been my experience that clients with 128MB RAM (for any OS later than Win98) are brought to their knees by DotNet apps. Any loading operation - starting up, or a creating new form - takes...
4
by: Zany | last post by:
I added a Web Deployment Project so I can create a debug, staging, and release version. Each set is compiled and saved in a separate folder under the csproj_deploy folder. All works fine. Here's...
2
by: bep | last post by:
I have a couple of web sites, some web services and some windows services that I need to deploy to our production servers. We used to use NANT with the VS 2003 applications. Now that we are using...
3
by: Venton | last post by:
I am currently using VS 2003 ASP.NET 1.1 I like the way that deployment of a new assembly is so simple, I just FTP the dll of the entire project across and that's it, none of the web users are any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...

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.