当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: Quick Overview of ASP.NET Sessio
 

 

 ·visual sourcesafe 6.0 的问题思考     »显示摘要«
    摘要:最近公司在我的推动之下要引入vss进行源代码管理了,我觉得公司里面规范行的制度太少,特别是在开发过程中的规范就更少了,包括单元测试这样最基本的东西都没有真正的规范下来,所以我想通过vss的使用,推广单元测试的概念,就算推广过程中有这样的或者那样的困难,但是这样的行动对公司是有利的,对个人也是有利的。现在的问题就是一个“度”了。昨天看vss的文档,发现了一个很大的问题啊:vs......
 ·怎么由dataset将数据导入excel?     »显示摘要«
    摘要: /// <summary> /// 将dataset里所有数据导入excel. /// 需要添加com: microsoft excel object library. /// using excel; /// </summary> /// <param name="filepath"></param> /// <para......


Using ASP.NET Session State in a Web Service
quick overview of asp.net sessions

the other mechanism that asp.net uses for maintaining session state works without cookies. some browsers do not support cookies or are not configured to keep and send cookies. asp.net provides a mechanism for getting around this problem by redirecting a request to a url that has the asp.net session id embedded in it. when a request is received, the embedded session id is simply stripped out of the url and is used to find the appropriate instance of the session object. this works great for browsers that are doing http get requests, but creates issues when writing microsoft® .net code that consumes an xml web service. 【程序编程相关:我的C#学习过程 第一天 安装

asp.net session state is maintained by using one of two underlying mechanisms. the first is by using http cookies. the idea behind http cookies is that when the client sends a request, the server sends back a response with an http set-cookie header that has a name/value pair in it. for all subsequent requests to the same server, the client sends the name/value pair in an http cookie header. the server then can use the value to associate the subsequent requests with the initial request. asp.net uses a cookie that holds a session id to maintain session state. then that id is used to find the corresponding instance of the httpsessionstate class for that particular user. the httpsessionstate class provides just a generic collection in which you can store any data that you want. 【推荐阅读:简单的c#文本文件读写

it should be noted that sometimes it makes sense to store state information in cookies themselves instead of in the asp.net session object. by avoiding the session object, you use fewer resources on the server, and you do not have to worry about issues like locating a specific instance of the session object across a web farm, instances of the session object being cleaned up because of a long delays between requests, or session instances lingering around for no reason until their timeout period expires. however, if you have data that includes implementation information that you do not want to share with the consumers of your service, or is private data that you do not want to send across an unencrypted channel, or if the data would be impractical to serialize into an http header, then it may make sense to take advantage of the httpsessionstate class in asp.net. the httpsessionstate class returns an index key that is used to map a particular user to an instance of the httpsessionstate class that holds information stored for that user. both the asp.net httpsessionstate class and http cookies are available to users writing asp.net web services.


...   下一页
    摘要:the following walkthrough demonstrates the use of a custom action and the customactiondata property to create a database and database table during installation.note this walkthrough requires sql serve......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE