【问题标题】:HttpContext.Current.Session cannot execute parallel wcf serviceHttpContext.Current.Session 无法执行并行 wcf 服务
【发布时间】:2018-09-28 06:49:37
【问题描述】:

我尝试调用并行请求它正在工作,但如果我添加了这条线而不是并行调用。

System.Web.HttpContext.Current.Session["UserName"] = "dtest";

有什么方法可以通过会话调用并行请求?

【问题讨论】:

    标签: asp.net web-services wcf session httpsession


    【解决方案1】:

    我也面临同样的问题。 以下解决方案对我有帮助。

     if (Context.Request.Path.Contains("xyz.svc"))
     {
           Context.SetSessionStateBehavior(SessionStateBehavior.ReadOnly);
     }
    

    请尝试检查这是否有效。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-27
      • 2016-11-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多