locked
Authentication failed on the remote side (the stream might still be available for additional authentication attempts). RRS feed

  • Question

  • User1666665689 posted

    Hi All,

    I am getting the following error.

    Authentication failed on the remote side (the stream might still be available for additional authentication attempts).

    Can any one suggest me, what I am supposed to do in order to resolve the issue. I get this issue, when my client connects to the service installed in another system.

    I have tried to set the Security Mode as None, still it gives me the same error message.

    Here is the configuration file of client system.

    <?xml version="1.0"?>
    <configuration>
    <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup><system.serviceModel>
      <bindings>
          <netTcpBinding>
              <binding name="NetTcpBindingEndpoint" closeTimeout="00:01:00"
                  openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                  transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
                  hostNameComparisonMode="StrongWildcard" listenBacklog="10"
                  maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
                  maxReceivedMessageSize="65536">
                  <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                      maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                  <reliableSession ordered="true" inactivityTimeout="00:10:00"
                      enabled="false" />
                  <security mode="Transport">
                      <transport clientCredentialType="Windows" protectionLevel="None" />
                      <message clientCredentialType="Windows" />
                  </security>
              </binding>
          </netTcpBinding>
      </bindings>
            <client>
                <endpoint address="net.tcp://192.168.169.153:8732/WCFLibrary/WCFWrapper/"
                    binding="netTcpBinding" bindingConfiguration="NetTcpBindingEndpoint"
                    contract="WCFWindowsHostedService.IWCFWrapper" name="NetTcpBindingEndpoint">
                    <identity>
                        <dns value="localhost" />
                    </identity>
                </endpoint>
            </client>
        </system.serviceModel>
    </configuration>

    Plz help me where I am going wrong.

    Regards

    G.V.N.Sandeep

    Friday, July 5, 2013 5:56 AM

Answers

  • User1666665689 posted

    My issue got resolved... We need to scale the ReaderQuotas in App.config of Client in order to avoid the issue.

    <readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                maxBytesPerRead="8192" maxNameTableCharCount="2147483647" />

    Updating this has resolved my issue.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 9, 2013 5:51 AM

All replies

  • User-488622176 posted

    what about the server config binding?

    Friday, July 5, 2013 9:42 AM
  • User1666665689 posted
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <system.web>
        <compilation debug="true" />
      </system.web>
      <!-- When deploying the service library project, the content of the config file must be added to the host's 
      app.config file. System.Configuration does not support config files for libraries. -->
      <system.serviceModel>
        <bindings>
          <netTcpBinding>
            <binding name="NetTcpBindingEndpoint" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
                hostNameComparisonMode="StrongWildcard" listenBacklog="10"
                maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
                maxReceivedMessageSize="65536">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                  maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <reliableSession ordered="true" inactivityTimeout="00:10:00"
                  enabled="false" />
              <security mode="None"/>
            </binding>
          </netTcpBinding>
        </bindings>
        <services>
          <service behaviorConfiguration="WCFLibrary.WCFWrapper"
              name="XpedeonWCFLibrary.XpedeonWCFWrapper">
            <endpoint address=""
                      binding="netTcpBinding"
                      bindingConfiguration=""
                      name="NetTcpBindingEndpoint"
                      contract="WCFLibrary.IWCFWrapper">
              <identity>
                <dns value="localhost" />
              </identity>
            </endpoint>
            <endpoint address="mex"
                      binding="mexTcpBinding"
                      bindingConfiguration=""
                      name="MexTcpBidingEndpoint"
                      contract="IMetadataExchange" />
            <host>
              <baseAddresses>
                <add baseAddress="net.tcp://192.168.169.153:8732/WCFLibrary/WCFWrapper/" />
              </baseAddresses>
            </host>
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior name="WCFLibrary.WCFWrapper">
              <serviceMetadata httpGetEnabled="false" />
              <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>
      <system.diagnostics>
        <trace autoflush="true" />
        <sources>
          <source name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
                  propagateActivity="true">
            <listeners>
              <add name="sdt"
                  type="System.Diagnostics.XmlWriterTraceListener"
                  initializeData= "SdrConfigExample.e2e" />
            </listeners>
          </source>
        </sources>
      </system.diagnostics>
    </configuration>
    
    
    

    This is my server configuration file.

    This works fine when I host the service in my system, if I host the service in a different system, then only I am getting the problems.

    Regards,

    G.V.N.Sandeep

    Monday, July 8, 2013 12:21 AM
  • User-488622176 posted

    If I'm not mistaking in your server config file : 

    The server states :

    <security mode="None"/>

    The client connects using Windows authentication. This is not really correct. You should match client & server binding configurations.

    Monday, July 8, 2013 7:34 AM
  • User1666665689 posted

    Hi Illeris,

    I have changed the client configuration security mode to "none", still it is of no use.

    If I host the WCF Service on my system, it is not giving me any issues. If I host the same service on a different machine.. then I am getting the issue.

    Regards,

    G.V.N.Sandeep

    Monday, July 8, 2013 7:52 AM
  • User-488622176 posted

    Is the IIS configuration of the web app on the other machine in line with your WCF security configuration? 

    Monday, July 8, 2013 7:55 AM
  • User1666665689 posted

    I am hosting the service as a Windows Service. So, I don't think so, we need to do any changes to the IIS.

    Monday, July 8, 2013 7:57 AM
  • User1666665689 posted

    My issue got resolved... We need to scale the ReaderQuotas in App.config of Client in order to avoid the issue.

    <readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                maxBytesPerRead="8192" maxNameTableCharCount="2147483647" />

    Updating this has resolved my issue.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 9, 2013 5:51 AM