简体   繁体   English

WCF如何同时与Web应用程序和Sharepoint Web服务通信?

[英]How can a WCF talk to Web Application and Sharepoint Web Services at the same time?

Web Application - > WCF Service - > Sharepoint User Profile Web Service Web应用程序-> WCF服务-> Sharepoint用户配置文件Web服务

I have a web application, a WCF service and Sharepoint 2010 Web Service. 我有一个Web应用程序,一个WCF服务和Sharepoint 2010 Web服务。

Sharepoint 2010 uses security mode = "TransportCredential only" for authentication by default, and the web application uses "Windows" as security mode. 默认情况下,Sharepoint 2010使用安全模式=“仅传输凭据”进行身份验证,并且Web应用程序将“ Windows”用作安全模式。

and sharepoint 2010 service uses Ntlm as client credential type, while web application uses "Windows" as client credential type. 和sharepoint 2010服务使用Ntlm作为客户端凭据类型,而Web应用程序使用“ Windows”作为客户端凭据类型。

How can i configure WCF service to be able to communicate with both Sharepoint Service and Web application at the same time. 我如何配置WCF服务以使其能够同时与Sharepoint Service和Web应用程序进行通信。

Web Application Web应用程序

<security mode="Message">
            <transport clientCredentialType="Windows" proxyCredentialType="None" realm="">
              <extendedProtectionPolicy policyEnforcement="Never"/>
            </transport>
            <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true"/>
          </security>

WCF Service WCF服务

<security mode="TransportCredentialOnly">
      <transport clientCredentialType="Ntlm" proxyCredentialType="None"
       realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>

Tim helped me get the answer 蒂姆帮我得到了答案

Have you looked at exposing separate endpoints? 您是否考虑过公开单独的端点? One for Sharepoint and one for the Web app? 一个用于Sharepoint,另一个用于Web应用程序? That would allow you to configure security for each endpoint individually. 这样,您就可以分别为每个端点配置安全性。 -Tim -蒂姆

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM