0

我有肥皂 WCF SharePoint:
[ServiceContract] public interface IService {

[OperationContract]
string Test();   

}

[BasicHttpBindingServiceMetadataExchangeEndpoint] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)] public class Service : IService {

public string Test()
{
    WindowsIdentity identity = ServiceSecurityContext.Current.WindowsIdentity;

    ClaimsIdentity claimsIdentity = new ClaimsIdentity(identity);

    return SPContext.Current.Web.Title;
}
 }

此服务映射到 ISAPI。在 SharePoint 上使用 FBA。以及如何连接到模拟/验证 FBA 用户的 WCF?

4

1 回答 1

0

当启用 windows 和 fba 身份验证顺序以使用 windows authentciation 需要添加标头“X-FORMS_BASED_AUTH_ACCEPTED”和值“f”:我使用 restsharp:

 request.AddHeader("X-FORMS_BASED_AUTH_ACCEPTED", "f")
于 2013-12-18T12:43:49.990 回答