App Domain

  • Thread starter Thread starter silva.sergiomanuel
  • Start date Start date
Hi,


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

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

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
 
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
 
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

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
 
Back
Top