小编Vai*_*mar的帖子

会话状态信息无效,可能在ASP.Net中已损坏

我正在使用ASP.Net 3.5和C#,开发ID:Visual Studio 2008.当我使用时

Session["FileName1"] = "text1.txt" 
Run Code Online (Sandbox Code Playgroud)

它工作正常,但后来我正在使用

number1=17;
string FileName1="FileName1" + number1.toString(); 
Run Code Online (Sandbox Code Playgroud)

然后设置

Session[FileName1]="text1.txt";
Run Code Online (Sandbox Code Playgroud)

给我运行时错误

会话状态信息无效,可能在System.Web.SessionState.SessionStateItemCollection.Deserializer(BinaryReader reader)中损坏

当我在Session变量中使用字符串时,任何人都可以解决我的问题吗?请记住,它适用于我的开发机器(意味着本地Visual Studio),但是当部署到服务器时,它会提供上述错误.

在此输入图像描述

asp.net session-variables session-state

5
推荐指数
1
解决办法
2463
查看次数

标签 统计

asp.net ×1

session-state ×1

session-variables ×1