c# - Why do I get WCF Exception "HTTP could not register URL http://+:80/MyService/" -
i create host endpointaddress needs use, this:
uri endpointaddress = new uri("http://127.0.0.1:5555/myservice"); servicehost host = new servicehost(myservicetype, endpointaddress); host.addserviceendpoint(implementedcontract, basichttpbinding, string.empty);
but when later host.open();
exception "http not register url http://+:80/myservice/ because tcp port 80 being used application". result same when
host.addserviceendpoint(implementedcontract, basichttpbinding, endpointaddress);
why try port 80? how can solve this?
update while trying provide more complete code sample, found culprit. added servicemetadatabehavior follows:
servicemetadatabehavior smb = new servicemetadatabehavior(); smb.externalmetadatalocation = new uri(this.externalmetadatalocation); smb.httpgetenabled = true; smb.httpgeturl = this.removeport(this.endpointaddress); host.description.behaviors.add(smb());
it seems in past needed remove port url work, that's causes problem.
so pratik right: metadata problem, , of course problem port 80 there's newly installed application using port.
thanks, regards,
miel.
this because port 80 used applicatiion error message says, local iis server. try stopping iis , see, or use port. on vista , above can use netsh command check ports reserved
btw have http metadata or mex endpoints in app.config or web.config file ?
Comments
Post a Comment