c# - Hosting WebHttp binded services in Castle WCF Facility -
i have wcf service, want host in castle wcf facility multiple bindings , 1 of them webhttp. have done same configuration described here specifying castle wcf integration facility endpoint behavior per endpoint. if register iendpointbehavior webhttpbehavior can guess bindings other webhttp fails. i'm not registering it. in way tcp binding works. webhttp binding, doing wrong? here code.
string internalendpointaddress = "http://localhost:8899/dummyservice"; contractdescription description = contractdescription.getcontract(typeof(idummyservice)); // create webhttp binding webhttpbinding webhttpbinding = new webhttpbinding(); endpointaddress webendpointaddress = new endpointaddress(internalendpointaddress); serviceendpoint webendpoint = new serviceendpoint(description, webhttpbinding, webendpointaddress); webendpoint.behaviors.add(new webhttpbehavior()); //and here wcf registration. keep clean removed net tcp registration... container.addfacility<wcffacility>(f => f.closetimeout = timespan.zero) .register(component.for<idummyservice>() .implementedby<dummyservice>() .lifestyletransient() .aswcfservice(new defaultservicemodel() .hosted() .addendpoints(wcfendpoint.fromendpoint(webendpoint)) .publishmetadata(o => o.enablehttpget())));
Comments
Post a Comment