none
IIS/WAS hosting : wiring up everything in AppInitialize .. is it possible ?

    Question

  • hi, i'm trying to setup net.tcp on WAS with 0 config, that is, i want to setup everything programmatically (as in a windows service).

    I've tried to put this code in the AppInitialize method 

    ServiceHost
    hostSystem = newServiceHost(typeof(WKI.Cosmo.Business.ClientServices));    
    BindingtcpBinding = newNetTcpBinding(SecurityMode.None, true);          hostSystem.AddServiceEndpoint(typeof(WKI.Cosmo.Interop.IClientServices), tcpBinding,           "IClientServices2.svc");
    hostSystem.Open();

    this code is called but gives the following error.
    System.InvalidOperationException: Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [].

    This makes somehow sense, however of course i do not wabnt to register a base address since i'm hosted in IIS/WAS. Seems like this method is called to early.
    Is what i'm trying to do a supported way ? Is there any solution ?

    thank you

    enrico sabbadin

    Tuesday, March 13, 2012 11:45 AM

All replies