.NET验证码页出错

简介:

.NET验证码页出现如果下错误.处理方法.

登录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. If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.

后台时很短的时间就返回到了登录界面。
开启ASP.NET State Service服务,把它设成自动。再在web.config中的<system.web>下加一行<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" timeout="20"/>,如下

一、开启ASP.NET State Service服务:

选择管理工具->服务,找到ASP.NET State Service,点开后选择启动,并将启动类型设为自动。

二、设置程序配置文件:

将web.config打开,会看到有一行是<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" timeout="20"/>,如果没有,请在<system.web>的下一行添加,再将其中的InProc改为StateServer,保存即可。(注:如果不修改,后台登录验证状态将会时断时续,表现在很短的时间内就出现重新登录框)

from: http://hi.baidu.com/net5x/blog/item/da8a0f666f6c5621ab184c93.html

**************************

如果不行尝试一下方法:

在web.config中有,<sessionState mode="StateServer"/>

这是session保存的方式,你现在选定的方式是stateserver,这是个"服务",但它默认不开启.

解决方法:
1.<sessionState mode="StateServer"/>改为<sessionState mode="InProc"/>

2.打开asp.net状态服务
"管理工具"->"服务"->"ASP.NET 状态服务"->启动




本文转自94cool博客园博客,原文链接:http://www.cnblogs.com/94cool/archive/2010/04/12/1710204.html,如需转载请自行联系原作者 

相关文章
|
前端开发 C# 开发工具
想用C# .Net生成行为验证码,还得看这篇文章
为了增强网站的安全性,我们在网站的登录模块或信息输入模块加入了验证码功能,那么在C# .Net中如何实现验证码呢?本文借助KgCaptcha实现了这个功能。
想用C# .Net生成行为验证码,还得看这篇文章
|
前端开发 PHP C#
分享一款漂亮的 C# .Net 图形验证码
网上大部分验证码都是PHP的,基于C# .Net开发的很少,推荐一款很漂亮且适用的C#图形验证码,可以自定义背景图库,功能还是挺强大
分享一款漂亮的 C# .Net 图形验证码
.net实现动态验证码
绪论:本文是.net实现动态验证码的显示,需使用到一般处理程序(ashx)
199 0
.net实现动态验证码
|
缓存
.net一般处理程序ashx生成验证码(原创+转载)
//第一种 using System; using System.Collections.Generic; using System.Web; using System.
939 0
|
3月前
|
开发框架 前端开发 .NET
ASP.NET CORE 3.1 MVC“指定的网络名不再可用\企图在不存在的网络连接上进行操作”的问题解决过程
ASP.NET CORE 3.1 MVC“指定的网络名不再可用\企图在不存在的网络连接上进行操作”的问题解决过程
41 0
|
1月前
|
开发框架 前端开发 .NET
进入ASP .net mvc的世界
进入ASP .net mvc的世界
29 0
|
1月前
mvc.net分页查询案例——mvc-paper.css
mvc.net分页查询案例——mvc-paper.css
5 0
|
1月前
|
开发框架 前端开发 .NET
C# .NET面试系列六:ASP.NET MVC
<h2>ASP.NET MVC #### 1. MVC 中的 TempData\ViewBag\ViewData 区别? 在ASP.NET MVC中,TempData、ViewBag 和 ViewData 都是用于在控制器和视图之间传递数据的机制,但它们有一些区别。 <b>TempData:</b> 1、生命周期 ```c# TempData 的生命周期是短暂的,数据只在当前请求和下一次请求之间有效。一旦数据被读取,它就会被标记为已读,下一次请求时就会被清除。 ``` 2、用途 ```c# 主要用于在两个动作之间传递数据,例如在一个动作中设置 TempData,然后在重定向到另
95 5