在发布ASP.NET网站的时候,出现state server错误:
Server Error in '/' Application.
--------------------------------------------------------------------------------
  Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  Exception Details: System.Web.HttpException: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection.
出现这种错误的原因,一般可以归纳为一下几点:
1、ASP.NET State Server 服务关闭了,开启即可。
     ASP.NET State Server服务默认是手动开启的, 所以很多时候在服务器重启后,ASP.NET State Server 服务其实是停止状态的,最好将该服务设成自动启动。
2、HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection的值不为1,确保服务器能接受远程请求。
    AllowRemoteConnection 的键值设置成“1”后,意味着允许远程电脑的连接,也就是说只要知道你的服务端口,就可享用你的ASP.NET State Service,即把 Session 存放在服务器进程内,但这样会导致安全性减弱。
3、42424端口被其他程序占用或者没有开启,因为42424端口是将session存在服务器进程必须的。
4、设成StateServer 后,必须要有对应的stateConnectionString 。
     Web.config中<sessionState> 节点内容应该设置成类似下面内容:
     <sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="300"/>

ASP.NET State Server 服务 sessionState的更多相关文章

  1. ASP.NET State Service服务

    ASP.NET State Service服务是用来管理 Session 的,正常来说,Session 位于IIS进程中(其实可以理解成在服务器的内存中),当IIS重启或程序池回收会自动清空Sessi ...

  2. Windows 7 系统中开启 ASP.NET State Service 服务的方法

    控制面板 -> 程序和功能 -> “打开或者关闭 Windows 功能”对话框 -> Internet 信息服务 -> 万维网服务 -> 应用程序开发功能 -> A ...

  3. 在发布ASP.NET网站的时候,出现state server错误

    错误信息如下: 在发布ASP.NET网站的时候,出现state server错误: Server Error in '/' Application. ------------------------- ...

  4. 如何应对Session丢失》》State Server

    Session丢失已经是一种习以为常的问题了,在自己也了解一些如何解决的问题,但是也一直没有机会去用,现在由于新的项目要在B/S下开发,所以不得不让我考虑Session的问题. 解决session丢失 ...

  5. 转:无法向会话状态服务器发出会话状态请求请。确保 ASP.NET State Service (ASP.NET 状态服务)已启动

    今天看到一篇文章感觉不错,收藏转载下. 原文地址:http://blog.csdn.net/sntyy/article/details/2090347 版权为原作者所有 无法向会话状态服务器发出会话状 ...

  6. 关于ASP.NET Session State Server

    最近公司开发的一个网站因为访问量增大,需要添加多台Web Server来进行负载均衡. 但是在做负载均衡前需要将一些原来固定存储在单台机器上的东西分离出来,使之能单独存在在一个独立的机器上,其中就有S ...

  7. ASP.NET中Session的sessionState 4种mode模式

    1. sessionState的4种mode模式 在ASP.NET中Session的sessionState的4中mode模式:Off.InProc.StateServer及SqlServer. 2. ...

  8. ASP.NET State Service

    本文来自:http://www.cnblogs.com/jhxk/articles/1648194.html 这一段就是配置应用程序是如何存储Session信息的了.我们以下的各种操作主要是针对这一段 ...

  9. 在IIS上发布项目后浏览时报的错:Unable to make the session state request to the session state server

    错误描述: Unable to make the session state request to the session state server. Please ensure that the A ...

随机推荐

  1. Linux下提示 bash: xxx command not found

    今天在虚拟机上安装了CentOS5.5,发现运行一些很正常的诸如:init,shutdown,fdisk 等命令时,悍然提示: bash: xxx command not found. 那么,首先就要 ...

  2. Daily Scrum Meeting ——ThirdDay

    一.Daily Scrum Meeting照片 二.Burndown Chart 三.项目进展 1.完成了github上的文档整理 Transcend/ActivityHelper 2.主界面侧滑框的 ...

  3. PYTHON 全局变量和局部变量

    #局部变量,只能调用函数体内的变量 def fun(): a = 234 print(a) #全局变量,在函数体外声明,在函数体内都可调用 b = 'gyc' def fun(): a = 234 p ...

  4. Python简单源码解析

    主要为一些简单的源代码的解析以及一些方法的理解. 说明:这些文件都不是我写的,详情可参考Github上的内容. 批量修改文件类型 def batch_rename(work_dir, old_ext, ...

  5. Eclipse 设置SVN忽略文件

    1.在 Eclipse 中点击菜单 window --> Preferences --> Team --> Ignored Resources 2.在Eclipse的导航视图中,选中 ...

  6. 面向对象(五)super

    super方法只是为了执行继承父级的init方法,若要详细,请参考别人的博客 class a(object): def __init__(self): print("aINIT") ...

  7. iOS-OC-基本控件之UIPageControl

    UIPageControl(页面控制器,就是桌面的那些小点点,每个点代表一个界面) 父类是 UIControl. iOS开发中常用的基本控件,主要和UIScrollView一起使用,比较常用的就是有些 ...

  8. 无废话ExtJs 入门教程十九[API的使用]

    无废话ExtJs 入门教程十九[API的使用] extjs技术交流,欢迎加群(201926085) 首先解释什么是 API 来自百度百科的官方解释:API(Application Programmin ...

  9. hadoop入门(1)——hadoop概述

    一.hadoop生态系统特点 开源.社区活跃.涉及分布式存储和计算的整个生态系统.已得到企业界验证. hadoop1.0与2.0版本的比较: 1.0包含HDFS+MapReduce. 2.0包括HDF ...

  10. [译]:Orchard入门——给网站添加页面

    原文链接:Adding Pages to Your Site 注:内容为官方文档翻译,本人遇到的page中间是布局,而非官网的body--但此内容可以在内容定义里自行修改(本文不做介绍) 在创建Orc ...