标签:
项目中,用到了WCF Service服务,用的是Windows身份验证,正常登陆后 HttpContext.Current=null
解决方法——
1.在Web.config文件中添加配置项
<system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> </system.serviceModel>
2.在Service类文件上添加Attribute
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
标签:
原文地址:http://www.cnblogs.com/lishidefengchen/p/4317395.html