在asp.net 应用程序和WCF服务之间共享FormsAuthentication,默认是不支持的,设置一下非常的简单,只需要两步就可以了:

1、在web.config的system.serviceModel增加一个配置:

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

2、为WCF打上标签

[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]

这样在WCF服务上就可以操作cookie了。

 附注:  

;
       }
   }


相关文章:

  • 2022-12-23
  • 2022-03-09
  • 2021-10-29
  • 2022-12-23
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-28
  • 2021-12-01
  • 2021-10-19
  • 2021-04-15
  • 2021-12-29
相关资源
相似解决方案