是否可以调用 SharePoint 中 Windows 服务中托管的 WCF 服务?
我有一个 WCF 服务托管在 Windows 服务中,位于我有 moss 的同一服务器中。
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>
知道发生了什么吗? 您是否有人成功做到了这一点?我在网上找不到任何示例。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该尝试禁用环回检查,方法是在
HKLM\System\CurrentControlSet\Control\Lsa
下创建一个名为DisableLoopbackCheck
的DWORD
并为其指定一个值1
。不要忘记稍后重新启动计算机。You should try to disable loopback checking, by creating a
DWORD
namedDisableLoopbackCheck
underHKLM\System\CurrentControlSet\Control\Lsa
and give it a value of1
. Don't forget to restart your computer later.