Groups | Blog | Home
all groups > dotnet framework > october 2005 >

dotnet framework : App Domain


silva.sergiomanuel NO[at]SPAM gmail.com
10/31/2005 9:26:38 AM
Hi,


Can my AppDomain ApplicationBase be something like
"http://www.mysite.com/dllstorage/" ?


When some dll was not found in applicationbase, does subfolders
will be checked automatically?


like "http://www.mysite.com/dllstorate/internal/somefile.dll"


Thanks in advance
Sreejith Ram
10/31/2005 11:51:54 AM
[quoted text, click to view]

Not all subfolders,
This link may help.. checkout "Locating the Assembly through Probing" section
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconstep4locatingassemblythroughcodebasesorprobing.asp



[quoted text, click to view]
Richard Grimes
11/1/2005 12:00:00 AM
[quoted text, click to view]

Yes, sort of.

[quoted text, click to view]

You can specify that a particular folder should be searched on the local
machine, you can also specify that a file is downloaded from a specific
location on the web. See the sections here about probing:

http://www.grimes.demon.co.uk/workshops/fusionWS.htm

Richard
--
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm

silva.sergiomanuel NO[at]SPAM gmail.com
11/2/2005 5:02:04 AM
Thanks for your answers.

I have another question

It's possible to load into app domain assemblies from two different
unrelated paths using two
diferent application base?

Example:
C:\ProgramFiles\Company\MySDK
and
\\remoteassembly\script.dll

Thanks
Richard Grimes
11/4/2005 12:00:00 AM
[quoted text, click to view]

The config file allows you to load a specific version of an assembly
from a specific location (as long as it has a strong name), so if you
have two assemblies one in C:\ProgramFiles\Company\MySDK and the other
in \\remoteassembly\, you can specify these locations in the config file
and (subject to security) they will be loaded.

However, you do have to question why you want to do this. The general
design of .NET is to have private assemblies in the application folder
(to facilitate XCOPY deployment) and to have shared assemblies in the
GAC. You should not share assemblies by providing your own company
folder (like C:\ProgramFiles\Company\MySDK) you gain nothing by doing
that.

Also, it means that you can only have one version of your company's
assembly in that shared folder. A new version would be copied over an
older version which would break older applications, this will be DLL
Hell all over again.

Loading from a remote site means that you download the assembly once -
the first time you access it - and the assembly will be cached locally
from where it will be loaded on the next run of the application. The
objects in this assembly will be run on the local machine. (Note that it
is cached in a user's profile folder, so if you can multiple users on a
machine they will *each* download the assembly once). So again, you have
to question why you want to download it from a remote location. If your
intention is to have the objects run on another machine, then you are
talking about .NET remoting.

Richard
--
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm

AddThis Social Bookmark Button