我已经阅读了很多关于这个主题的内容,但我没有得到解决方案。 我已经尝试过社区发布的所有解决方案,但没有成功。
我正在将站点从IIS 6.0迁移到7.5。该站点同时具有ASP和ASP.NET应用程序,因此我设置了两个不同的池。 ASP.NET应用程序没有问题。
我遇到的问题是ASP应用程序。所有ASP应用程序都使用另一个应用程序,其目标是授予用户权限。当授予用户应用创建session ("accepted")
变量并且在重定向时丢失时,问题就出现了。 此功能在IIS 6.0中正常运行
我已经跟踪了问题,并确认重定向时出现错误。
我已尝试并检查以解决问题:
会话属性
访问网站的端口:: 8685
我附上了我认为相关的屏幕截图
我编写了一个显示会话变量内容的ASP页面。在重定向之前,会正确创建会话变量,但是当重定向发生时,信息将丢失。
我附上了我的企业政策允许我发布的代码:
response.write("Accepted: " & session("aceptado") & "<br>")
response.write ("SQL: " & mySQL & "<br>")
response.write("Accepted: " & session("aceptado") & "<br>")
dim i,j
j = Session.Contents.Count
Response.Write("Session contents: " & j & "<br>")
Response.Write("Contents: <br>" )
For Each i in Session.Contents
Response.Write(i & "<br>")
Next
Response.write("isNull: " & IsNull(Session) & "<br>")
Response.write("¿Aceptado? " & Session("aceptado"))
使用上面的代码,结果是:
重定向发生后检查会话状态的代码是:
<%response.buffer = true
%>
<html>
<h1>test</h1>
<%
dim i,j
j = Session.Contents.Count
Response.Write("Session contents: " & j & "<br>")
Response.Write("Contents: <br>" )
For Each i in Session.Contents
Response.Write(i & "<br>")
Next
%>
isNull: <%=IsNull(Session)%> <br>
¿Aceptado?: <%=Session("aceptado")%><br>
incidencia : <%=Session("tipoincidencia")%><br>
usuario : <%=Session("usuario")%>
</html>
执行上述代码的结果:
重定向发生在最后两张图片之间
答案 0 :(得分:0)
我的解决方法是简单地每X开始一次ajax调用(其中X大约是会话到期时间的一半,在我的情况下是7.5分钟)。
这不是超级干净,但完成工作。