ajax实现并把结果记录在Session中 
用HttpContext.Current.Session
出错:未将对象引用设置到对象的实例用Session
出错:只有在配置文件或 Page 指令中将 enableSessionState 设置为 true 时,才能使用会话状态。还请确保在应用程序配置的 <configuration>\<system.web>\<httpModules> 节中包括 System.Web.SessionStateMod 或自定义会话状态模块。
可是我也经加了如下
    <pages enableSessionState="true"/>
    <httpModules>
      <clear />
      <add name="OutputCache" type="System.Web.Caching.OutputCacheModule" />
      <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" />
      <add name="Session" type="System.Web.SessionState.SessionStateModule"/>
    </httpModules>

解决方案 »

  1.   

    ajax实现并把结果记录在Session中 ?AJAX 
      

  2.   

    参考
    http://www.cnblogs.com/tishifu/archive/2008/04/12/872749.html
    http://www.cnblogs.com/Tmouse/articles/588551.html
      

  3.   

    使用ajax对session赋值的话有些ajax框架需要加上特殊的属性的像ajaxpro.dll就需要,是不是这方面的问题?
      

  4.   

    1.using System.Web; 2.在web.config里添加<sessionState mode="InProc"></sessionState>3.将[AjaxMethod]改为[AjaxMethod(HttpSessionStateRequirement.ReadWrite)]
      

  5.   

    html页怎么可能对服务器对象进行操作呢?Session是服务器对象
      

  6.   

    aspx 页我也试了效果一样,不好使