I have created a DLL (class library) in .NET that I need to dynamically load
from my ASP.NET application.
I am trying to use Assembly.Load(...) to load the file, which is in the /bin
directory of the web app but I am getting a failure.
The class library is just a simple DLL with just one method. It's not
strong name, versioned or installed in the GAC. I just want to load it in
(without using LoadFrom() and explictly passing
c:\inetpub\wwwroot\webapp\bin\mylibrary.dll" which is a major hack IMHO).
Is this possible? I have tried using:
Assembly.Load("MyNamespace");
Assembly.Load("MyNamespace.dll");
Assembly.Load("MyNameSpace MyNamespace.dll")
Is there a way to do this without hacking in a hard-coded path?