use*_*166 5 wcf forms-authentication
在我的服务实施中,我有:
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
在我的.config文件中,我有:
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
和:
<system.web.extensions> <scripting> <webServices> <authenticationService enabled="true" requireSSL = "false"/> </webServices> </scripting> </system.web.extensions>
和:
<authentication mode="Forms" />
在我的服务的"登录"方法中,我有:
FormsAuthentication.SetAuthCookie(request.UserName, false);
但是,当我检查:
HttpContext.Current.User.Identity.Name
这是一个空字符串.我错过了什么?
归档时间: |
|
查看次数: |
1817 次 |
最近记录: |