Asp.net 响应后会话丢失。重定向
我需要你的帮助 从哪里开始我可以找出我的配置有什么问题? 在我的开发机器上,当我在Visual Studio 2015中使用“浏览器中的视图”时,我的代码保留会话值 但是,当我切换用户(Windows计算机上的另一个用户帐户)并使用Visual Studio查看同一页面时,页面重定向中的会话值将丢失。我还在我朋友的开发机器上尝试了我的代码,会话值也丢失了 这是由于IIS Express配置造成的吗?IIS Express应用程序池是否内存不足并正在回收池-导致会话重置?或者这可能是由于64位计算机上的IIS Express版本32位/64位造成的 下面是我测试此行为的示例代码: SessionRedirect.aspxAsp.net 响应后会话丢失。重定向,asp.net,vb.net,session,visual-studio-2015,iis-express,Asp.net,Vb.net,Session,Visual Studio 2015,Iis Express,我需要你的帮助 从哪里开始我可以找出我的配置有什么问题? 在我的开发机器上,当我在Visual Studio 2015中使用“浏览器中的视图”时,我的代码保留会话值 但是,当我切换用户(Windows计算机上的另一个用户帐户)并使用Visual Studio查看同一页面时,页面重定向中的会话值将丢失。我还在我朋友的开发机器上尝试了我的代码,会话值也丢失了 这是由于IIS Express配置造成的吗?IIS Express应用程序池是否内存不足并正在回收池-导致会话重置?或者这可能是由于64位计算
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="SessionRedirect.aspx.vb" Inherits="Sandbox_SessionRedirect" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>
A: <% Response.Write(Session("A")) %>
</p>
<p>
B: <% Response.Write(Session("B")) %>
</p>
<asp:Button ID="Button1" runat="server" Text="Go" />
</div>
</form>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="SessionRedirect2.aspx.vb" Inherits="Sandbox_SessionRedirect2" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>
A: <% Response.Write(Session("A")) %>
</p>
<p>
B: <% Response.Write(Session("B")) %>
</p>
</div>
</form>
</body>
</html>
SessionRedirect2.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="SessionRedirect.aspx.vb" Inherits="Sandbox_SessionRedirect" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>
A: <% Response.Write(Session("A")) %>
</p>
<p>
B: <% Response.Write(Session("B")) %>
</p>
<asp:Button ID="Button1" runat="server" Text="Go" />
</div>
</form>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="SessionRedirect2.aspx.vb" Inherits="Sandbox_SessionRedirect2" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>
A: <% Response.Write(Session("A")) %>
</p>
<p>
B: <% Response.Write(Session("B")) %>
</p>
</div>
</form>
</body>
</html>
A:
B:
响应后会话重定向2.aspx的结果。重定向:
A:
B:
我打开了跟踪,但仍然注意到会话值在重定向到第2页时丢失
<%@ Page Trace="true" %>
任何帮助都将不胜感激。
谢谢。将两页顶部的AutoEventWireup=“false”更改为AutoEventWireup=“true”我四处搜索,找到了一些有关IIS的信息,但在Microsoft TechNet上没有找到IIS Express:Worker process recycling drops应用程序会话状态-