c - Trouble with endpoints of my wcf -


my wcf service web.config.

<?xml version="1.0" encoding="utf-8"?> <configuration>   <connectionstrings>     <add name="zesdaagseresultscontext" connectionstring="data source=194.33.112.88\partywhere;initial catalog=zesdaagseresults;persist security info=true;user id=*********;password=******************/;multipleactiveresultsets=true"       providername="system.data.sqlclient" />   </connectionstrings>   <system.servicemodel>     <services>       <service name="wcfopzet.mobileservice" behaviorconfiguration="mexbehavior">         <endpoint binding="webhttpbinding" contract="wcfopzet.imobileservice" behaviorconfiguration="webhttpbehavior" />         <endpoint contract="imetadataexchange" binding="mexhttpbinding" address="mex" />       </service>     </services>     <behaviors>       <servicebehaviors>         <behavior name="mexbehavior">           <servicemetadata httpgetenabled="true" />         </behavior>       </servicebehaviors>       <endpointbehaviors>         <behavior name="webhttpbehavior">           <webhttp />         </behavior>       </endpointbehaviors>     </behaviors>   </system.servicemodel>   <startup>     <supportedruntime version="v4.0" sku=".netframework,version=v4.0" />   </startup>   <system.web>     <compilation debug="true" />   </system.web> </configuration> 

my wcf client mobileservicereference.clientconfig.

<configuration>   <system.servicemodel>     <bindings>       <basichttpbinding>         <binding name="webhttpbinding"                  maxbuffersize="2147483647"                  maxreceivedmessagesize="2147483647">           <security mode="none" />         </binding>              </basichttpbinding>     </bindings>     <client>       <endpoint address="http://zesdaagse.mobi-app.be/wcfurl/mobileservice.svc"                 binding="basichttpbinding"                 bindingconfiguration="webhttpbinding"                 contract="mobileservice.imobileservice"                 name="webhttpbinding"                  />     </client>     <!--<behaviors>       <endpointbehaviors>         <behavior name="webhttpbehavior">           <webhttp/>         </behavior>       </endpointbehaviors>     </behaviors>-->   </system.servicemodel> </configuration> 

my error when run windows phone application.

there no endpoint listening @ http://zesdaagse.mobi-app.be/wcfurl/mobileservice.svc accept message. caused incorrect address or soap action. see innerexception, if present, more details.

explanation

i searched don't fixed. there wrong endpoints don't know what.

ah, see using basichttpbinding in client , webhttpbinding (rest) in service... that's reason why it's not working, no?

extra fyi: tried call service myself , 405, means didn't specify [webget] or [webinvoke] attributes service operations.

with following client side config, should able call service (after attributing operations webget)

<?xml version="1.0" encoding="utf-8" ?> <configuration>     <startup>          <supportedruntime version="v4.0" sku=".netframework,version=v4.5" />     </startup>   <system.servicemodel>     <bindings>       <webhttpbinding>         <binding name="webhttpbinding"                  maxbuffersize="2147483647"                  maxreceivedmessagesize="2147483647">           <security mode="none" />         </binding>       </webhttpbinding>     </bindings>     <client>       <endpoint address="http://zesdaagse.mobi-app.be/wcfurl/mobileservice.svc"                 binding="webhttpbinding"                 bindingconfiguration="webhttpbinding"                 contract="mobileservice.imobileservice"                 name="webhttpbinding"                 behaviorconfiguration="webhttpbehavior"                 />     </client>     <behaviors>       <endpointbehaviors>         <behavior name="webhttpbehavior">           <webhttp/>         </behavior>       </endpointbehaviors>     </behaviors>   </system.servicemodel> </configuration> 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -