在WCF服务到服务调用中保留HttpContext.Current.Session

本文关键字:服务 HttpContext Current 保留 Session 调用 WCF | 更新日期: 2023-09-27 18:26:50

我有一个WCF服务(WCFSERVICE_1),它调用第二个WCF服务。在第一次调用时,我正在WCFSERVICE_2的HttpContext.Current.Session中写入一些变量。但是当我第二次调用时,HttpContext.Current.Session(WCFSERVICE_2)是空的。

在WCF服务到服务调用中保留HttpContext.Current.Session

我终于找到了答案。若你们有同样的问题,请阅读这篇文章。http://blogs.msdn.com/b/wenlong/archive/2010/02/21/using-asp-net-sessions-from-wcf.aspx