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

How to add dll search path? (2.0)

Hi All,

Is there any way I can specify additional dll search path, preferably in
web.config, which would be used by asp.net 2.0 when binding assemblies?
I have many dlls shared among applications and I prefer not to add them to
the GAC, but also I do not want to keep/manage multiple copies in every web
application's folder.

Thank you for any hints.

Tomasz
Oct 18 '06 #1
2 6707
Hello Tomasz,

As for the dll search path, it is called assembly probing path of .net
framework runtime. For normal .net framework application, at runtime when
it load a certain assembly, it will go through the following steps to
locate the assembly:

#How the Runtime Locates Assemblies
http://msdn2.microsoft.com/en-us/library/yx7xezcf.aspx
** if strong-named, first check GAC

** if there is a <codebasesetting for the matche assembly, the code base
location will be used:

#<codeBaseElement
http://msdn2.microsoft.com/en-us/library/efs781xb.aspx

Note that if the assembly has a strong name, the codebase setting can be
anywhere on the local intranet or the Internet. If the assembly is a
private assembly, the codebase setting must be a path relative to the
application's directory.
** looking for the assembly in application's private probing path, and here
it will differ for different .net applications:

1) for normal winform or console application, by default the private
assembly probing path is the same directory of the application root
directory. And we can add additional sub directories for probing through
app.config file:

#<probingElement
http://msdn2.microsoft.com/en-us/library/823z9h8w.aspx

2)if the application is ASP.NET web application, it always uses the fixed
"bin" sub directory as the only probing path. We can not add additional one
because ASP.NET CLR host is a customized host.
Therefore, for your scenario, if your common assemblies are strong-named,
you can put them into GAC to make them globally shared. If they're not
strong-named, it will be hard for them to share among multiple ASP.NET
applciations due to the existing limitation.

BTW, though it is not supported at .net /ASP.NET level, we can consider
using the windows NTFS's symbolic links(hard link) feature to link one
physical file directory to another physical file directory. You can have a
look at the "Symbolic links" feature to see whether it helps you some:
#Symbolic links in Windows
http://www.thierryb.net/site/Symboli...n-Windows.html
There is also a tool from sysinternals site that can help create symbolic
links conveniently.
#Sysinternals Freeware - Junction
http://www.sysinternals.com/Utilities/Junction.html

Thus, you can link your mutiple application's private bin path to the same
physical directory(if they will not have other non-shared assembly which
has conflict name).

Hope this helps. Please feel free to let me know if you have any questions
on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.



Oct 19 '06 #2
Hello Tomasz,

How are you doing on this issue? Have you got any further ideas or does the
information in my last reply help you a little? Please feel free to let me
know if there is anything we can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Oct 23 '06 #3

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

Similar topics

11
by: Ben | last post by:
Greetings, I am looking for a way to search for and delete files based on a pattern mask. For example, the search method would find all files matching a certain pattern containing wildcards (e.g....
1
by: Les Juby | last post by:
A year or two back I needed a search script to scan thru HTML files on a client site. Usual sorta thing. A quick search turned up a neat script that provided great search results. It was fast,...
0
by: Hriday | last post by:
Hi there, I am working on a web application in ASP.NET My web server and AD machine are in the same domain but located on diffrent phisical machine, I am not able to search user's info by the...
12
by: Eric Renken | last post by:
I have an application that I am adding support for plug-ins and I am looking for some help on the best way to handle this. My question has to do with AppDomains and the best way to use them. I...
4
by: ravindarjobs | last post by:
hi...... i am using ms access 2003,vb6 i have a form. in that i have 2 buttons 1. start search 2 stop search when i click the "start search" button the fucntion SearchSystem() is called,...
3
by: linq936 | last post by:
Hi, I always have an impression that for the following semantics: #include <something e.g. #include <stdio.h> Compiler searches it from built-in header search path, on UNIX, it could be...
1
by: mhearne808[insert-at-sign-here]gmail[insert-dot-he | last post by:
I think I don't understand how the module search path works... Let's say I have a folders called 'test'. Underneath it, I create two more folders called 'foo' and 'bar'. In 'foo', I create an...
8
by: tow | last post by:
I have a python script (part of a django application, if it makes any difference) which is exhibiting the following behaviour: import my_module # succeeds imp.find_module("my_module") # fails,...
2
by: Mike Driscoll | last post by:
On Sep 25, 10:41 am, js <ebgs...@gmail.comwrote: Why not just add a custom path file (*.pth)? EasyInstall, wx, PyWin32 and others do it. Of course there's always sys.path.append as well. Mike
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.