使用WebRequestCreator.ClientHttp时,HttpContext.Current.User.Identity.IsAuthenticated为false

时间:2013-11-20 16:52:02

标签: forms-authentication servicestack

我正在使用ServiceStack和ClientHttp Web请求模式,当我尝试检查用户当前是否已登录时(有时我需要在asp.net身份验证和SS之间建立桥梁)我得到了IsAuthenticated为false ...我已经以这种方式配置了我的服务客户端

            jsonServiceClient = new ServiceStack.ServiceClient.Web.JsonServiceClient(BaseAddressHelper.GetBasePathWithApiPath());

            jsonServiceClient.ShareCookiesWithBrowser = true;
            jsonServiceClient.UseBrowserHttpHandling = false;
            jsonServiceClient.StoreCookies = true;

但当我在服务上时,我得到了假...如果我使用jsonServiceClient.UseBrowserHttpHandling = true;那部分还可以,但是当我得到一个例外情况时,我不能正确地反序列化..你们中的任何人都有同样的问题吗?

提前致谢

0 个答案:

没有答案