469,927 Members | 1,832 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

Problem loading plug-in DLLs with Assembly.LoadFrom()

I have created a number of "plug-in" DLLs for my ASP.NET application which
are dynamically loaded at run-time. This is done by locating the DLL file on
disk and loading it using the Assembly.LoadFrom(Filename) function.

It's important that the DLLs are shadowed by ASP.NET so that they can be
easily updated. To get this to work I have placed the DLLs into the bin\
directory inside my web application. This seems to work fine.

However, to reduce the clutter of DLLs I would like to put them into a
sub-directory, bin\PlugIns\, but I'm having problems getting this to work.
If I put the DLLs in the new directory and tell my app to load from that
location (specifying the full path:
D:\Work\MyWebApp\bin\PlugIns\MyPlugIn.dll) I get a
"System.IO.FileLoadException: Access is denied" error. The error message
also includes the following:
=== Pre-bind state information ===
LOG: Where-ref bind. Location = D:\Work\MyWebApp\bin\PlugIns\MyPlugIn.dll
LOG: Appbase = file:///D:/Work/MyWebApp
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===
LOG: Private path hint found in configuration file: bin;bin\PlugIns.
LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Attempting download of new URL
file:///D:/Work/MyWebApp/bin/PlugIns/MyPlugIn.dll.
As can be seen, I've tried adding bin\PlugIns to the probing path but it
doesn't make any difference.

Any suggestions?

--

(O)enone
Nov 19 '05 #1
0 1473

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Roland | last post: by
13 posts views Thread by Jason Jacob | last post: by
2 posts views Thread by Rob | last post: by
18 posts views Thread by Derek Martin | last post: by
3 posts views Thread by matdumsa | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.