I have an assembly (Assembly A) referenced from another assembly (Assembly B) that is referenced by a WCF service application. In Assembly A I need too see the types from other assemblies referenced by the service assembly. I would do this by calling Assembly.GetEntryAssembly()
(which works fine if the service is hosted in a separate application) but since the service is hosted on IIS this returns null. Assembly A is called from my custom ServiceHostFactory
in Assembly B so the calling assembly is System.ServiceModel
and the Assembly.GetExecutingAssembly()
returns Assembly A. I also tried giving the name of the service application's assembly in the App.config file and calling Assembly.Load()
on it, but that threw an exception that said the assembly or one of its dependencies could not be found.
Could you suggest a way how to find the service application's assembly?
Aucun commentaire:
Enregistrer un commentaire