摘要: http://www.cnblogs.com/gaojun/archive/2009/05/30/1492303.html 在使用VS2005的过程中发现了一个问题,就是原来在VS2003中很好用的全局变量文件Global.ascx改变了,只剩下一个页面,文件所有代码都是写在页面上的。 当我们发布Web程序的时候这个文件也没有被发布出去,致使在Global中写的代码都没有被执行。最先开始用了一个临... 阅读全文
posted @ 2010-01-27 23:06 emanlee 阅读(408) 评论(0) 推荐(0) 编辑
摘要: A key reason that the Application object exists in ASP.NET is for compatibility with classic ASP code—to allow easier migration of existing applications to ASP.NET. If you are creating an ASP.NET appl... 阅读全文
posted @ 2010-01-27 22:10 emanlee 阅读(1778) 评论(0) 推荐(0) 编辑
摘要: HttpContext.Current.Application来保存变量时,发现一段时间没有活动连接时,会和Session变量一样被自动回收,清空了,不知道修改什么地方可以实现生存周期的控制? 原来IIS6.0应用程序池的性能设置里可以设置回收空闲进程的时间,默认好象只有30分钟,怪不得.无论是static还是application都依赖进程,难怪都被回收了. ----------------... 阅读全文
posted @ 2010-01-27 21:07 emanlee 阅读(678) 评论(0) 推荐(0) 编辑