使用Session—Start方法实现网站访问日志的记录  

To Achieve Site Access Log Records with Session-Start Method

在线阅读下载全文

作  者:吴明恕[1] 

机构地区:[1]装备指挥技术学院图书馆,北京101416

出  处:《计算机光盘软件与应用》2011年第7期134-135,155,共3页Computer CD Software and Application

摘  要:本文简要概述了ASP.NET网站中Gl0bal.asax文件,比较了该文件中四种典型的方法。得出可以在Session—Start方法实现对网站访问的记录,从而达到统计网站访问情况的目的。本文以记录用户IP访问记录为例,给出了访问日志记录的数据库设计以及在Session-Start方法中实现记录用户IP的完整代码,并对Session—Start方法在多用户并发访问情况下处理进行了讨论。Session—Start方法依赖于用户会话SessionlD,由于会话过期策略的限制,用户在连续时间的访问可能会被多次记录,但作为一般统计用途的日志记录,并不需要精确地记录每一条到访数据,可以根据网站实际访问停留情况对会话的过期策略进行相应的调整,减少重复记录的生成。This paper briefly outlines the Global.asax file in ASP.NET Web site.From the four typical methods in Global.asax file compared, Session-Start method can be obtained on the Web site access records,so as to achieve the purpose of site visits statistics.In this paper, recording user IP access records taked as example, gives access logging database design and the complete code of Session_Start method for recording the user IP.Session-Start method was discussed under multi-user concurrent connection.Session-Start method relies on the user's session SessionlD,because of the policy limits to the expired session, so user access in continuous time may be logged many times.But as a general statistical purposes,the log records do not need to accurately record data in each visit.According to the actual situation website access,session expiration policies can be adjusted to reducing the generation of duplicate records.

关 键 词:Session-Start 会话模型 访问日志 ASP.NET 

分 类 号:TP393[自动化与计算机技术—计算机应用技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象