views:

53

answers:

1

I have a WCF Service hosted in a Windows Service in the same server where i have moss.

The WCF works well calling it from a Console application, but if i call it from a page within Sharepoint, it throws a timed out exception.

I added the following configuration to the webconfig:

  <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IReplication" closeTimeout="00:10:00"
            openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
            bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
            maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
            messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
            allowCookies="false">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00"
              enabled="false" />
          <security mode="Message">
            <transport clientCredentialType="Windows" proxyCredentialType="None"
                realm="" />
            <message clientCredentialType="Windows" negotiateServiceCredential="true"
                algorithmSuite="Default" establishSecurityContext="true" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:8000/Replication/service"
          binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IReplication"
          contract="ServiceReference1.IReplication" name="WSHttpBinding_IReplication">
        <identity>
          <servicePrincipalName value="host/mypc-f1d530f" />
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>

Any idea about what is happening? Do you about anyone has successfully did that? I could not find any sample on the web.

A: 

You should try to disable loopback checking, by creating a DWORD named DisableLoopbackCheck under HKLM\System\CurrentControlSet\Control\Lsa and give it a value of 1. Don't forget to restart your computer later.

Rubens Farias