【发布时间】: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