T
Tor Bådshaug
BlankHi,
I am having trouble loading assemblies from the database in my ASP.NET app.
I have a default.aspx in my app that is served from a database via a custom virtual path provider. This works fine, until this
default.aspx uses code in a dependent assembly (say CustomAssembly). Then ASP.NET cannot find the class "CustomAssembly.MyClass" and files
to compile the default.aspx.
I've tried to do a
AppDomain.CurrentDomain.Load(byte[] rawAssembly)
up front (prior to default.aspx compilation) to help ASP.NET to find this class, but the ASP.NET runtime looks to ignore it. However, I can successfully do
AppDomain.CurrentDomain.CreateInstance("CustomAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "CustomAssembly.MyClass");
Also, I can verify that the "CustomAssembly" is actually loaded by looking at the value of AppDomain.CurrentDomain.GetAssemblies().
The custom assembly i loaded from database is included there, get its codebase set to something like file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary%20ASP.NET%20Files/root/300b5c74/97825cbb/assembly/dl3/95cc4ab5/aa815946_b9bac801/AppWeb.DLL
Why does ASP.NET ignore the existence of classes that are actually loaded into the runtime and are accessible through reflection?
Any suggestions on the next steps to achieve the dynamical loading I am seeking?
(I need to create a sort of host application to which modules can be plugged/deployed in at runtime)
-Tor
I am having trouble loading assemblies from the database in my ASP.NET app.
I have a default.aspx in my app that is served from a database via a custom virtual path provider. This works fine, until this
default.aspx uses code in a dependent assembly (say CustomAssembly). Then ASP.NET cannot find the class "CustomAssembly.MyClass" and files
to compile the default.aspx.
I've tried to do a
AppDomain.CurrentDomain.Load(byte[] rawAssembly)
up front (prior to default.aspx compilation) to help ASP.NET to find this class, but the ASP.NET runtime looks to ignore it. However, I can successfully do
AppDomain.CurrentDomain.CreateInstance("CustomAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "CustomAssembly.MyClass");
Also, I can verify that the "CustomAssembly" is actually loaded by looking at the value of AppDomain.CurrentDomain.GetAssemblies().
The custom assembly i loaded from database is included there, get its codebase set to something like file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary%20ASP.NET%20Files/root/300b5c74/97825cbb/assembly/dl3/95cc4ab5/aa815946_b9bac801/AppWeb.DLL
Why does ASP.NET ignore the existence of classes that are actually loaded into the runtime and are accessible through reflection?
Any suggestions on the next steps to achieve the dynamical loading I am seeking?
(I need to create a sort of host application to which modules can be plugged/deployed in at runtime)
-Tor