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

推荐订阅源

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

博客园 - cean

MSSQL 2005删除所有表的语句[转] MSSQL 2000更改表和存储过程的所有者 C#的String.Split方法[转] StreamReader读取记事本 - cean - 博客园 表中随机查询记录 几种基本的数字正则表达式[转] 浅谈window.attachEvent [转] 典文回顾:程序员规划职业道路时需考虑的十个问题[转CSDN] 水印坐标设置 [转]HTML 编辑器大全 关于使用updatepanle后页面还会刷新的个人解决方法。 - cean - 博客园 [转]Asp.net(Ajax)表单验证 函数包 母版页判断登陆 及 母版页与内容页的执行顺序 - cean [转]SQL2000和SQL2005同时安装问题 C#泛型详解[转] .Net课堂:总结必须学习的10项.NET技术[转] 如何建立最初的三层架构[转] 运行asp.net时弹出the status code returned from the server was:404错误提示 iis5.1配置php运行环境
在.ashx文件下使用session[转] - cean - 博客园
cean · 2009-11-09 · via 博客园 - cean

在一般处理程序中使用session时必须继承一下   System.Web.SessionState.IReadOnlySessionState   的接口,否则为会出

"未将对象引用设置到对象的实例。 "

首先需要引用 using System.Web.SessionState;

并实现类的IReadOnlySessionState接口

public class CheckMemberLogin : IHttpHandler,IReadOnlySessionState{

public void ProcessRequest (HttpContext context) {

 if(context.Session["membername"]==null)

{

context.Response.Write("会员已登录");

}

}

}