WCF身份验证流程

时间:2011-12-21 17:46:22

标签: asp.net wcf security authentication wshttpbinding

我正在从ASP.NET应用程序调用WCF服务。从这里,我使用WSHTTPBinding访问WCF服务。我可以从HttpContext.Current.User.Identity.Name获取当前用户。我希望能够将此传递给WCF(不使用自定义标头 - 当然有正确的方法来执行此操作。)它必须是HttpContext.Current.User.Identity.Name中的标识而不是{{ 1}},因为可以从使用Forms或Windows身份验证的ASP.nET应用程序中使用此服务。根据我的理解,它应该出现在WindowsIdentity.GetCurrent().Name中。我已经寻找年龄来试图找到答案,但还没有找到它。