tags:

views:

18

answers:

0

I have to log WCF-service client IP inside IIS-6-hosted WCF service in Intranet Environment. There was a wonderful answer how to do that and it works perfectly for wsHttpBinding interface. But when I use my wsDualHttpBinding interface I retrieve "" (string.Empty) value in endpoint.Address field

May be it's not wsDuallHttpBinding problem - please, take a look at the server-side configuration:

Server-side

<wsDualHttpBinding>
        <binding name="BasicDuplexBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
              receiveTimeout="00:01:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"
              hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288000"
              maxReceivedMessageSize="65536000" messageEncoding="Mtom"
                 textEncoding="utf-8" useDefaultWebProxy="true" >
          <security mode="None">
            <message clientCredentialType="None"/>
          </security>
          <readerQuotas maxDepth="4194304" maxStringContentLength="4194304" maxArrayLength="4194304"
                maxBytesPerRead="4194304" maxNameTableCharCount="4194304" />
        </binding>
      </wsDualHttpBinding>

May be I have misconfigured something? My code at the server side is the following:

var context = OperationContext.Current;
var prop = context.IncomingMessageProperties;
var endpoint = prop[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
endPoint.Address // <--  string.Empty for wsHttpDual and IP for wsHttp

Thank you in advance!