web services - WCF - HTTP could not register URL http://+:80/ -
my first post on stackoverflow!
i having problems wcf service trying build , need in trying figure out.
there 2 parts service, first simple rest style web service full of methods, works fine.
the next area pub/sub model push out subscribers internally results of particular invoke method first area. incorporate listening on 2 endpoints, every time invoke 1 method on pubsub service error above. after searching interwebulator have seen lot of posts saying iis using port 80 default.
now 2 questions: 1. service listening on following base address, nothing 80 http://localhost:3526/tradeportal , http://localhost:3526/tradeportal/operations 2. ideally host in iis
the suggestion change client base address not use port 80, set on sever side or client side config.
i'm bit puzzled solution this, have built pubsub model using nettcp binding.
any clues how solve appreciated
server side config:
<system.servicemodel> <services> <service behaviorconfiguration="default" name="cfp_web_lib.tradeportal"> <host> <baseaddresses> <add baseaddress="http://localhost:3526/tradeportal"/> </baseaddresses> </host> <endpoint address="" binding="webhttpbinding" contract="cfp_web_lib.itradeportal" behaviorconfiguration="web" /> <endpoint address="operations/" binding="wsdualhttpbinding" contract="cfp_web_lib.itradeoperations"/> </service> </services> <behaviors> <servicebehaviors> <behavior name="default"> <servicemetadata httpgetenabled="true"/> <servicedebug includeexceptiondetailinfaults="true"/> </behavior> </servicebehaviors> <endpointbehaviors> <behavior name="web"> <webhttp/> </behavior> </endpointbehaviors> </behaviors> </system.servicemodel>
client side code (auto generated vs2010)
<system.servicemodel> <bindings> <wsdualhttpbinding> <binding name="wsdualhttpbinding_itradeoperations" closetimeout="00:01:00" opentimeout="00:01:00" receivetimeout="00:10:00" sendtimeout="00:01:00" bypassproxyonlocal="false" transactionflow="false" hostnamecomparisonmode="strongwildcard" maxbufferpoolsize="524288" maxreceivedmessagesize="65536" messageencoding="text" textencoding="utf-8" usedefaultwebproxy="true"> <readerquotas maxdepth="32" maxstringcontentlength="8192" maxarraylength="16384" maxbytesperread="4096" maxnametablecharcount="16384" /> <reliablesession ordered="true" inactivitytimeout="00:10:00" /> <security mode="message"> <message clientcredentialtype="windows" negotiateservicecredential="true" /> </security> </binding> </wsdualhttpbinding> </bindings> <client> <endpoint address="http://localhost:3526/tradeportal/operations/" binding="wsdualhttpbinding" bindingconfiguration="wsdualhttpbinding_itradeoperations" contract="cfp_web.itradeoperations" name="wsdualhttpbinding_itradeoperations"> <identity> <userprincipalname value="callison@cfpartners.local" /> </identity> </endpoint> </client> </system.servicemodel>
the problem client not server. wsdualhttpbinding
uses 2 connections - 1 client server , 1 server client (to support callbacks). reason why called dual. allow incomming connection client exposes own server (callback implementation) under hood. service must have address , unused port. if not specify address default use port 80 in use iis. must change address on client side. use clientbaseaddress
attribute of binding configuration.
Comments
Post a Comment