WCF client cannot connect to WCF service hosted in IIS via ServiceHost? -


i have scheme:

iis

  • hosts: operatorservice.svc (connects clientservice)
  • global.asax (on start): hosts clientservice via servicehost

wpf client

  • connects clientservice


if go operatorservice service activated, web application started, , clientservice hosted @ http://localhost:8020/clientservice. far good.

i can access clientservice in aforementioned url in browser, can add through add service reference. it's there - running.

but when try connect via generated client (looks ok), doesn't work. throwing:

there no endpoint listening @ http://localhost:8020/clientservice accept message. caused incorrect address or soap action. see innerexception, if present, more details.

moreover operatorservice connects clientservice (it wsdualhttpbinding provide notifications). subscribes correctly service (calling method) , works (same url wpf client).

why can't connect wpf client?

wpf client config (only relevant sections):

<client>     <endpoint address="http://localhost:8020/clientservice" binding="wsdualhttpbinding"         bindingconfiguration="defaultbindingclientservice" contract="server.iclientservice"         name="defaultbindingclientservice">         <identity>             <serviceprincipalname value="host/ohs-upc" />         </identity>     </endpoint> </client> <bindings>     <wsdualhttpbinding>         <binding name="defaultbindingclientservice" />     </wsdualhttpbinding> </bindings> 

iis hosted web.config (for clientservice)

<service name="telpro.ohs.server.services.clientservice" behaviorconfiguration="unsecuredbehavior">     <endpoint address="" binding="wsdualhttpbinding" bindingconfiguration="defaultbindingclientservice" contract="telpro.ohs.server.services.iclientservice"/>     <endpoint address="mex" binding="mexhttpbinding" contract="imetadataexchange"/>     <host>         <baseaddresses>             <add baseaddress="http://localhost:8020/clientservice"/>         </baseaddresses>     </host> </service>  <wsdualhttpbinding>     <binding name="defaultbindingclientservice"/> </wsdualhttpbinding>  <behavior name="unsecuredbehavior">     <servicemetadata httpgetenabled="true" httpsgetenabled="false"/>     <servicedebug includeexceptiondetailinfaults="true"/> </behavior> 

iis hosted web.config (for operatorservice -> clientservice)

<client>     <endpoint address="http://localhost:8020/clientservice" binding="wsdualhttpbinding"          bindingconfiguration="defaultbindingclientservice" contract="clientnotificationserver.iclientservice"          name="defaultbindingclientservice" /> </client>  <wsdualhttpbinding>     <binding name="defaultbindingclientservice" /> </wsdualhttpbinding> 

i able solve switching port 80.

http://localhost/clientservice 

somehow works. i've tried add rules port 8020 everywhere (even stopped firewall), checked port forwarding, azure endpoints, etc. theory problem when server trying connect (callback) client , has no rights or something. guess iis hosted service doesn't have enough rights connect back. if can still shed light on why, gladly switch answer them. far i'm glad works regardless port.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -