我正在使用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),但是当部署到服务器时,它会提供上述错误.
