【问题标题】:Is it possible to call a WCF Service hosted in a Windows Service within SharePoint?是否可以在 SharePoint 中调用托管在 Windows 服务中的 WCF 服务?
【发布时间】:2010-02-02 11:02:07
【问题描述】:

我有一个 WCF 服务托管在我有 moss 的同一台服务器的 Windows 服务中。

WCF 从控制台应用程序调用它运行良好,但如果我从 Sharepoint 内的页面调用它,它会引发超时异常。

我在 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>

知道发生了什么吗? 你有没有人成功地做到了这一点?我在网上找不到任何示例。

【问题讨论】:

    标签: wcf sharepoint windows-services wss wcf-binding


    【解决方案1】:

    您应该尝试禁用环回检查,方法是在HKLM\System\CurrentControlSet\Control\Lsa 下创建一个名为DisableLoopbackCheckDWORD,并为其赋值1。稍后不要忘记重新启动计算机。

    【讨论】:

      猜你喜欢
      • 2011-07-13
      • 1970-01-01
      • 1970-01-01
      • 2019-08-29
      • 1970-01-01
      • 2012-01-13
      相关资源
      最近更新 更多