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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International 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.
困惑中,有人知道为什么不?