简体   繁体   English

WCF服务窗口身份验证

[英]WCF Service windows authentication

a WCF Service in hosted in our internal server. 托管在我们内部服务器中的WCF服务。 an external client will consume it and, our Service will consume our SharePoint service in order to edit an item list. 外部客户端将使用它,我们的服务将使用我们的SharePoint服务来编辑项目列表。 The WCF Service will have the automatically earn the windows authentication to access to the SharePoint site so I do not have to provide a login and password not domain name. WCF服务将自动获得Windows身份验证以访问SharePoint站点,因此我不必提供登录名和密码而不是域名。

I am not sure how I am supposed to code my service: 我不确定我应该如何编写我的服务代码:

NetworkCredential credential = CredentialCache.DefaultNetworkCredentials; 

will be enough? 会够的吗?

Architecture 建筑

但是,如果您确实需要使用特定帐户,则可以执行以下操作:

NetworkCredential credentials = new System.Net.NetworkCredential("name", "password", "optional:domain");

IMO, it should be enough, if your wcf and SharePoint services in same (or trusted) domains, and you select appropriative security mode. IMO,如果您的wcf和SharePoint服务在相同(或受信任)的域中,并且您选择专用的安全模式,那就足够了。

See for more details: http://msdn.microsoft.com/en-us/library/ms733836.aspx 有关详细信息,请参阅: http//msdn.microsoft.com/en-us/library/ms733836.aspx

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

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