解决方案 »

  1.   

     你下个断点  看Session写入成功没有 就是在ashx中
      

  2.   

    解决你的情况
    http://www.cnblogs.com/TivonStone/archive/2012/04/06/2434796.html
      

  3.   

    public class abc : IHttpHandler,IRequiresSessionState需要继承这个
      

  4.   

    问题中我已经说了,我已经继承了IRequiresSessionState
      

  5.   


    那就检查你的浏览器是否已禁用来cookies
      

  6.   

    还有就是配置文件
    <sessionState mode="InProc" timeout="60"></sessionState>
      

  7.   

    你VS按F5调试的时候有错误会提示:程序有错误,是否以原来的程序运行?
    如果你点了是,并点了下次不再提示
    那么恭喜你,你会遇到各种意想不到的状况
    因为你以后每次改完代码而代码有错误的时候,程序不会提示你有错误,而是直接以上一个能运行的版本运行了.
      

  8.   

    添加用户Session
      <asp:Label ID="Label8" runat="server" SkinID="20" Text="用户名:" Width="68px" 
                    style="font-size: small"></asp:Label>
      <span style="font-size: 9pt"><asp:TextBox ID="txtUid" 
                    runat="server" Width="105px" Font-Size="9pt"></asp:TextBox></span>
                    Session["UserName"] = this.txtUid.Text;
    二、获取Session
     protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserName"] == null)
            {
                Response.Redirect("Index.aspx");
            }
        }
      

  9.   

    具体忘了 我记得以前遇到过这个问题 
    让你的这个Ashx类 继承 IRequiresSessionState