惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
Help Net Security
Help Net Security
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
L
LINUX DO - 热门话题
Security Latest
Security Latest
A
Arctic Wolf
G
GRAHAM CLULEY
月光博客
月光博客
S
Securelist
D
Docker
J
Java Code Geeks
T
Troy Hunt's Blog
T
Tenable Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
SecWiki News
SecWiki News
S
Security @ Cisco Blogs
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 最新话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
aimingoo的专栏
aimingoo的专栏
博客园 - 【当耐特】
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
Netflix TechBlog - Medium
Vercel News
Vercel News
Forbes - Security
Forbes - Security
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
B
Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Check Point Blog
云风的 BLOG
云风的 BLOG
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Blog of Author Tim Ferriss
L
Lohrmann on Cybersecurity
F
Full Disclosure
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed

博客园 - whale

Ajax提交失败,因为输入框带尖括号< listview添加列 - whale - 博客园 局域网中访问xp机器用户名为灰色,不能修改 SQL2005服务启动不了是因为VIA协议启动了 负载测试错误表包含:“未能找到应用阈值规则所需的从属计数器” CString, BSTR, LPCTSTR之间得关系和区别 移动流媒体技术及其应用发展方向(转载) - whale - 博客园 vs2005使用analysis service 项目出现错误尝试读取或写入受保护内存... - whale Excel连接Analysis service2005初始化数据源失败 利用SQL中的递归返回多行数据的连接 SQL Server不能调试存储过程解决方法 文本框放到下拉框上面。 - whale - 博客园 ADO 读取Excel文件数据, 丢失数据或数据错误问题。 最好的.net学习资源 今天开始开发Mobile5.0项目 组件 访问被拒绝 配置错误 VB运行调试时提示不能修改 .net调试时,计算机调试管理服务被禁用的解决 局部变量的生命周期和委托的关系
不同层的session在timeout后不能跨层访问的原因。
whale · 2006-04-03 · via 博客园 - whale

我又个项目,其中两个层用到session.
1.web层,直接是asp.net页面的代码
UIProcess层, 供页面调用的类层,引用System.web 使得可以直接访问session
在代码运行中,UIProcess层会设置session.

        Public Shared Sub ShowInfoPage(ByVal info As InfoPageInfo)
            Session.Item(
"InfoPageInfo"= info
            Load(PageIdItem.InfoPage)
        
End Sub

在session中储存info对象

在页面中,会读取这个session

  Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        
'在此处放置初始化页的用户代码
        'If Not IsPostBack Then
        'Try
        Dim info As InfoPageInfo
        info 
= CType(Session.Item("InfoPageInfo"), InfoPageInfo)
        
With info
            
If Not .infoHeader = String.Empty Then Me.infoHeaderText = .infoHeader
            Me.InfoMessage 
= .infoMessage
            
If Not .RedirectUrl = String.Empty Then Me.RedirectUrl = .RedirectUrl
            
If Not .RedirectMessage = String.Empty Then Me.RedirectMessage = .RedirectMessage
        
End With
        
'Catch ex As Exception

        
'End Try
        'Session.Item("InfoPageInfo") = Nothing
        ' End If
    End Sub

在调试运行中,这个设置和读取是没问题的。
但隔一段时间后,再去做同样的操作,设置部分代码允许正常,但读取部分总返回nothing.
困惑中,有人知道为什么不?