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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top