0

i have hosted a wcf service in iis on remote machine and trying to access that service from another machine.both the machines are in the same domain.the app.config of client:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <wsDualHttpBinding>
                <binding name="WSDualHttpBinding_IReportReceiver" 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="Mtom" 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="None">
                        <message clientCredentialType="Windows" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
            </wsDualHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://nts0104:5950/ReportReceiver.svc"
                binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_IReportReceiver"
                contract="ServiceReference1.IReportReceiver" name="WSDualHttpBinding_IReportReceiver">
                <identity>
                    <userPrincipalName value="ReportServer\reportserver@ac.lp.acml.com" />
                </identity>
            </endpoint>
        </client>


    </system.serviceModel>
  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel"
              switchValue="Error"
              propagateActivity="true">
        <listeners>
          <add name="traceListener"
              type="System.Diagnostics.XmlWriterTraceListener"
              initializeData= "c:\log\Traces.svclog" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>
  </configuration>

the service runs under a specific pool and account reportserver@ac.lp.acml.com. no clue of y this happens.surfed alot and nothing helped.pls provide in ur solutions. thanks

sow
  • 1
  • 2

2 Answers2

1

This is very likely to be a firewall issue as wsDualHttpBinding tries to open a connection from server back to client (to support the callbacks). This is very likely to fail in most robust network environments.

My advice would be to use NetTcpBinding instead as it sends the callbacks down the same connection that the client opened to the server

I blogged about this here

Richard Blewett
  • 6,089
  • 1
  • 18
  • 23
  • i wanna use wsdualhttpbinding. so any other solutions pls – sow Jan 31 '12 at 08:35
  • since both the machines are in the same domain, i feel this may not be the firewall issue – sow Jan 31 '12 at 09:18
  • Remember that Windows has a built in firewall which will block the incoming connection by default. Also it is quite possible to have firewalls within a domain network setup. Out of interest, why are you so intent on using wsDualHttpBinding? Its slower and less reliable than NetTcpBinding – Richard Blewett Jan 31 '12 at 09:21
  • i wanna use wsdualhttpbinding for clients over internet – sow Jan 31 '12 at 10:27
  • it is very unlikely that wsDualHttpBinding will work over the internet - are you using it between client and server or server and server? – Richard Blewett Jan 31 '12 at 15:40
  • using it between client and server.So will netTcpBinding work for both internet and intranet scenarios? – sow Feb 01 '12 at 04:20
  • The only requirement to make it work across the internet is that the port that is used for the endpoint must be open on the firewall – Richard Blewett Feb 01 '12 at 08:30
  • fine will try with that.Can you pls answer my other question which i posted sday http://stackoverflow.com/questions/9077197/callback-client-not-working-in-wcf-wsdualhttpbinding – sow Feb 01 '12 at 08:49
0

finally got it working with wsDualHttpBinding. In the app.config of the client added the attribute useDefaultWebProxy="true" under binding element.

<wsDualHttpBinding>
                <binding name="WSDualHttpBinding_IReportReceiver" 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="Mtom" 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"
                            algorithmSuite="Default" />
                    </security>
                </binding>
            </wsDualHttpBinding>
sow
  • 1
  • 2
  • 1
    Any chance you could post both your web.config and you app.config? as well as leave information about what firewall changes you had to make? – Lawrence Thurman Jul 16 '14 at 13:34