How to use Assembly.LoadFile to load assembly in different path?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use Assembly.LoadFrom() to load assembly and execute it dynamic. The assembly is called in both background service and aspx. so the assembly are copied in two paths. ( I do not want to use the assembly into GAC ).
And I use Serviced Components in the assembly, I use regsvcs to register it into COM+. Here the problem happened, The COM+ only can remember the assembly in one path, the call from another path will failed. the error message is: Type must be a type provided by the runtime, not a TypeDelegator, etc.

So I hope to load the assembly dynamic and from specific path. MSDN Library says Assembly.LoadFile can be used, but it do less work than Assembly.LoadFrom(). Can you give me some sample or advice about it?

Thanks in advance
 
Back
Top