locked
Communication between two Servers

    Question

  • Hello,

    I have two WCF services S1 and S2 both running on WINDOWS XP machines A, B, C,... hosted by IIS 5.1

    A client consumes S1 on A. This works fine. But when S1 tries to consume S2 on B,  I get an authentification error from B on opening the proxy.
    May be this is a problem with the ASPNET account.
    Because I'm not interested in authentification in the moment, I simply set  <security mode="None"/>

    Now the proxy on A is always connecting to the service S2 on A instead of B independend of the endpoint.address 

    How can it happen, that the proxy ignores the
    endpoint.address ?

    Thanks a lot for any idea

    Here my web.config:

    <configuration>
      <system.serviceModel>
        <services>
          <service name="Services.S1" behaviorConfiguration="Behave">
            <endpoint address="" 
                      binding="wsDualHttpBinding" 
                      bindingConfiguration="Binding1" 
                      contract="Services.IS1" />
            <endpoint address="mex" binding="mexHttpBinding" name="MexData" contract="IMetadataExchange" />
          </service>
          <service name="Services.S2" behaviorConfiguration="Behave">
            <endpoint address="" 
                      binding="wsHttpBinding" 
                      bindingConfiguration="Binding2NoSec" 
                      contract="Services.IS2" />
            <endpoint address="mex" binding="mexHttpBinding" name="MexData" contract="IMetadataExchange" />
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior name="Behave">
              <serviceMetadata httpGetEnabled="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <client>
          <endpoint address="http://172.16.1.1/MyServices/S2.svc"
                    binding="wsHttpBinding"
                    bindingConfiguration="Binding2NoSec" 
                    contract="Services.IServiceStation"
                    name="A1">
          </endpoint>
          <endpoint address="http://172.16.1.2/MyServices/S2.svc"
                    binding="wsHttpBinding"
                    bindingConfiguration="Binding2NoSec" 
                    contract="Services.IServiceStation"
                    name="A2">
          </endpoint>
        </client>
        <bindings>
          <wsDualHttpBinding>
            <binding name="Binding1" 
                     clientBaseAddress="http://172.16.1.1:8001/MyClient/" 
                     closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
                     bypassProxyOnLocal="false" useDefaultWebProxy="true" transactionFlow="false"
                     hostNameComparisonMode="Exact" maxBufferPoolSize="524288" maxReceivedMessageSize="10000000" messageEncoding="Text" textEncoding="utf-8">
              <readerQuotas maxDepth="32" maxStringContentLength="10000000" maxArrayLength="10000000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <security mode="Message">
                <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" />
              </security>
            </binding>
          </wsDualHttpBinding>
          <wsHttpBinding>
            <binding name="Binding2" 
                     closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
                     bypassProxyOnLocal="false" useDefaultWebProxy="false" transactionFlow="false" 
                     hostNameComparisonMode="Exact" 
                     maxBufferPoolSize="524288" maxReceivedMessageSize="10000000" messageEncoding="Text" textEncoding="utf-8">
              <readerQuotas maxDepth="32" maxStringContentLength="10000000" maxArrayLength="10000000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <security mode="Message">
                <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" />
              </security>
            </binding>
            <binding name="Binding2NoSec" 
                     closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
                     bypassProxyOnLocal="false" useDefaultWebProxy="false" transactionFlow="false" 
                     hostNameComparisonMode="Exact" 
                     maxBufferPoolSize="524288" maxReceivedMessageSize="10000000" messageEncoding="Text" textEncoding="utf-8">
              <readerQuotas maxDepth="32" maxStringContentLength="10000000" maxArrayLength="10000000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <security mode="None"/>
            </binding>
          </wsHttpBinding>
        </bindings>
      </system.serviceModel>
      <system.diagnostics>
        <trace autoflush="true" indentsize="4">
          <listeners>
            <add name="FileListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="Trace.log" />
            <remove name="Default" />
          </listeners>
        </trace>
      </system.diagnostics>
    </configuration>
    
    Tuesday, July 14, 2009 12:24 PM

Answers

  • Hello,

    got it solved. So forget this.

    - Communication between servers need user, password in ASPNET account.
    - if proxy and service are part of one dll, take care of namespace

    Manfred
    • Marked as answer by mb43mb Wednesday, July 15, 2009 6:54 AM
    Wednesday, July 15, 2009 6:53 AM

All replies

  • You'd be better off posting this to the WCF forum.
    Tuesday, July 14, 2009 1:42 PM
  • Hello,

    got it solved. So forget this.

    - Communication between servers need user, password in ASPNET account.
    - if proxy and service are part of one dll, take care of namespace

    Manfred
    • Marked as answer by mb43mb Wednesday, July 15, 2009 6:54 AM
    Wednesday, July 15, 2009 6:53 AM