WCF Only Add Service Reference in Same Project -


i have wcf service , able create proxies if project in creating proxies (by adding service reference) in same solution wcf service.

however, if try add service reference in project, in different solution wcf service (which have running), unable find endpoint.

the message talks meta data, have added following behaviour exposes metadata

<servicemetadata httpgetenabled="true" /> 

the details of error message are:

there error downloading 'http://localhost:8112/lta/_vti_bin/listdata.svc/$metadata'. request failed http status 405: method not allowed. metadata contains reference cannot resolved: 'http://localhost:8112/lta'. there no endpoint listening @ http://localhost:8112/lta accept message. caused incorrect address or soap action. see innerexception, if present, more details. remote server returned error: (404) not found. if service defined in current solution, try building solution , adding service reference again. 

does have idea problem is? whole servicemodel element is:

<system.servicemodel> <services>   <service name="wcflicenceservice.licencetrackerservice">     <host>       <baseaddresses>         <add baseaddress="http://localhost:8112" />       </baseaddresses>     </host>     <endpoint address="lts" binding="basichttpbinding" contract="wcflicenceservice.ilicencetrackerservice" />     <endpoint        address="net.tcp://localhost:8113/lts"        binding ="nettcpbinding"        contract="wcflicenceservice.ilicencetrackerservice" />   </service> </services> <behaviors>   <servicebehaviors>     <behavior>       <servicedebug includeexceptiondetailinfaults="true" />       <servicemetadata httpgetenabled="true" />     </behavior>   </servicebehaviors> </behaviors> <bindings>   <basichttpbinding>     <binding maxreceivedmessagesize="2147483647" maxbuffersize="2147483647">       <readerquotas maxarraylength="2147483647" maxstringcontentlength="2147483647" />     </binding>   </basichttpbinding>   <nettcpbinding>     <binding maxreceivedmessagesize="2147483647" maxbuffersize="2147483647">       <readerquotas maxarraylength="2147483647" maxstringcontentlength="2147483647"/>     </binding>   </nettcpbinding> </bindings> </system.servicemodel> 

as had seen, service reference created against http://localhost:8112/lta/_vti_bin/listdata.svc/$metadata has live. if web service project in same sln, vs ide trick through launching service on built-in web server iis express. if service project sitting in sln, have run service in instance of vs ide.

for large projects, , web services consumed many other projects siting in other vs solutions, better not use service reference approach, rather, may create client api each service. , client api distributed other .net projects. more details how create client api , respective benefits, please check wcf real world, not hello world


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -