WCF and DCOM interop, how to specify configuration files for the WCF service hosted inside a DCOM service. RRS feed

  • Question

  • Hello everyone.
    We have an existing DCOM service and would like to expose this service to java and .net clients using WCF. I tried to use WCF to DCOM interop. I have some questions.

    1. I created a WCF service class library (assembly dll) with the contract interface and the implementation,
    then used COM interop to call the WCF service dll from the Unmanaged C++ Windows service.

    When the WCF service assembly tries to call the ServiceHost::Open method I am getting the following error.

    "exception caught Service 'TestService' has zero application (non-infrastructure) end points. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element "

    I have the application configuration file for the WCF service assembly, but how can I specify the configuration file for the WCF service loaded inside the unmanaged application.As i mentioned earlier the WCF service is hosted inside the unmanaged windows service.

    Is there any way to programmatically specify the application configuration file for the WCF to look for the end points?.



    Friday, November 10, 2006 6:37 PM


  • You may want to host the Service class library in a seperate app domain , that you create in your unmanaged service. When you create the appdomain you can specify the config file location for app domain.

    Look at the AppDomainSetUp class and you can find samples on hosting clr in unmanaged processes.

    Friday, December 22, 2006 9:14 PM