项目中,用到了WCF Service服务,用的是Windows身份验证,正常登陆后 HttpContext.Current=null

解决方法——

  1.在Web.config文件中添加配置项

<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
  </system.serviceModel>

  2.在Service类文件上添加Attribute

 [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]

相关文章:

  • 2021-10-29
  • 2021-11-28
  • 2021-12-18
  • 2021-10-20
  • 2022-01-03
  • 2022-01-12
猜你喜欢
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2021-05-23
  • 2022-12-23
  • 2021-08-28
相关资源
相似解决方案