| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> asp >> ASP.net ye mian bei guan bi hou , fu wu qi duan shi fou reng ran zhi xing zhong ?

ASP.net ye mian bei guan bi hou , fu wu qi duan shi fou reng ran zhi xing zhong ?

2008-07-24 07:22:16 编辑來源:互联网 评论
 
 
 
本文为【ASP.net 页面被关闭后,服务器端是否仍然执行中?】的拼音翻译版
  wen ti : dang yi ge zheng zai zhi xing zhong de ASPX ye mian zhi xing dao yi ban de shi hou , liu lan qi zhong ni guan bi le zhe ge ye mian , fu wu qi duan dui ying de zhe ge ye mian de dai ma reng ran zai zhi xing me ?
  da an : chu fei ni dai ma li mian zuo le te shu pan duan , fou ze reng ran zheng zai zhi xing 。
  zhu yi dian :
  1、 ke hu duan xian shi ye mian de shi hou , hou tai yi jing zhi xing wan le de ye mian dui xiang zao yi jing bu cun zai le 。 dang ran zhe shi hou tan bu shang fu wu qi duan zhi xing bu zhi xing de wen ti le 。
  2、 ye mian huan mei you fan hui , chu yu deng dai zhuang tai de shi hou 。 guan bi ASPX ye mian , cai hui she ji dao shang mian ti dao de fu wu qi duan reng ran zai zhi xing de qing kuang 。
  3、 ke hu duan guan bi de shi hou gen ben bu xiang fu wu qi fa song zhi ling 。
  4、 chu fei ni dai ma li mian zuo le te shu pan duan , zhe li de te shu pan duan zhi yong if(!Response.IsClientConnected) lai jian ce zhuang tai er yong dai ma zhong zhi yun xing 。
  xia mian de jian dan dai ma jiu shi yan shi guan bi ye mian hou , kan shi fou reng ran zai zhi xing ?
  ni ke yi zai zhe ge ye mian da kai hou , huan mei you fan hui ren he xin xi de shi hou ba zhe ge ye mian guan bi , ran hou kan zhi ding mu lu xia shi fou you dui ying wen jian bei chuang jian bing tian xie nei rong 。
   protected void Page_Load(object sender, EventArgs e)
   {
   StringBuilder txt = new StringBuilder();
   txt.AppendLine();
   txt.AppendLine(DateTime.Now.ToString("u"));
   txt.AppendLine("asvd");
   Response.Write(DateTime.Now.ToString("u"));
   Response.Write("\r\n");
   Thread.Sleep(50000);
   txt.AppendLine(DateTime.Now.ToString("u"));
   Response.Write(DateTime.Now.ToString("u"));
   Response.Write("\r\n");
   // ba yi xie xin xi xie dao ling wai yi ge wen jian , jie ci cha kan shi fou zheng zai yun xing
   string dir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs");
   if (!Directory.Exists(dir))
   Directory.CreateDirectory(dir);
   DateTime dt = DateTime.Now;
   string shortfileName = string.Format("errors_{0:0000}{1:00}{2:00}.log", dt.Year, dt.Month, dt.Day);
   string fileName = Path.Combine(dir, shortfileName);
   StreamWriter sw;
   if (File.Exists(fileName))
   sw = File.AppendText(fileName);
   else
   sw = File.CreateText(fileName);
   sw.Write(txt.ToString());
   sw.Close();
   sw = null;
   }
  zuo le te shu pan duan de qing kuang jian dan li zi :
  zhu yi : IsClientConnected de pan duan zai VS.net kai fa gong ju zi dai de kai fa zhan dian ASP.NET Development Server shi bu zhi chi de 。 ASP.NET Development Server yong yuan fan hui true 。
  IIS cai shi zhi chi de 。
   protected void Page_Load(object sender, EventArgs e)
   {
   StringBuilder txt = new StringBuilder();
   for (int i = 0; i < 100; i++)
   {
   if (this.Response.IsClientConnected)
   {
   txt.AppendLine();
   txt.AppendLine(DateTime.Now.ToString("u"));
   txt.AppendLine(i.ToString());
   Response.Write(DateTime.Now.ToString("u"));
   Response.Write("\r\n");
   Thread.Sleep(500);
   }
   else
   {
   Response.End();
   return;
   }
   }
   txt.AppendLine(DateTime.Now.ToString("u"));
   Response.Write(DateTime.Now.ToString("u"));
   Response.Write("\r\n");
   // ba yi xie xin xi xie dao ling wai yi ge wen jian , jie ci cha kan shi fou zheng zai yun xing
   string dir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs");
   if (!Directory.Exists(dir))
   Directory.CreateDirectory(dir);
   DateTime dt = DateTime.Now;
   string shortfileName = string.Format("errors_{0:0000}{1:00}{2:00}.log", dt.Year, dt.Month, dt.Day);
   string fileName = Path.Combine(dir, shortfileName);
   StreamWriter sw;
   if (File.Exists(fileName))
   sw = File.AppendText(fileName);
   else
   sw = File.CreateText(fileName);
   sw.Write(txt.ToString());
   sw.Close();
   sw = null;
   } zhe ge li zi zhong shi fa xian zhong duan , jiu pao qi zhi qian zuo de ren he dong xi 。
  dang ran wo men ye ke yi jian dan de xiu gai shang shu dai ma , rang ba yi jing chu li wan cheng de dong xi ji lu xia lai , lei si xia mian de dai ma
   protected void Page_Load(object sender, EventArgs e)
   {
   StringBuilder txt = new StringBuilder();
   for (int i = 0; i < 100; i++)
   {
   if (this.Response.IsClientConnected)
   {
   txt.AppendLine();
   txt.AppendLine(DateTime.Now.ToString("u"));
   txt.Append("********** ");
   txt.AppendLine(i.ToString());
   Response.Write(DateTime.Now.ToString("u"));
   Response.Write("\r\n");
   Thread.Sleep(500);
   }
   else
   {
   break;
   }
   }
   txt.AppendLine(DateTime.Now.ToString("u"));
   Response.Write(DateTime.Now.ToString("u"));
   Response.Write("\r\n");
   // ba yi xie xin xi xie dao ling wai yi ge wen jian , jie ci cha kan shi fou zheng zai yun xing
   string dir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs");
   if (!Directory.Exists(dir))
   Directory.CreateDirectory(dir);
   DateTime dt = DateTime.Now;
   string shortfileName = string.Format("errors_{0:0000}{1:00}{2:00}.log", dt.Year, dt.Month, dt.Day);
   string fileName = Path.Combine(dir, shortfileName);
   StreamWriter sw;
   if (File.Exists(fileName))
   sw = File.AppendText(fileName);
   else
   sw = File.CreateText(fileName);
   sw.Write(txt.ToString());
   sw.Close();
   sw = null;
   } xu yao zhu yi de shi , shi yong isClientConnected shi yao zhan yong yi ding de xi tong zi yuan de 。
  isClientConnected shi ji shang xu yao xiang ke hu duan shu chu yi dian dong xi , ran hou cai zhi dao ke hu duan shi fou reng ran zai xian 。
  zhe yang , chu fei ni de ying yong fei chang hao shi , fou ze jian yi ni bu yao yong isClientConnected 。 mian de pan duan isClientConnected shi yong de zi yuan bi ni shi ji ye wu luo ji shi yong de zi yuan huan yao duo 。
  zai ren he qing kuang xia , Response.IsClientConnected dou yao you xie kai xiao , suo yi , zhi you zai zhi xing zhi shao yao yong 500 hao miao ( ru guo xiang wei chi mei miao ji shi ye de tun tu liang , zhe shi yi ge hen chang de shi jian le ) de cao zuo qian cai shi yong ta 。 zuo wei tong chang de gui ze , bu yao zai jin mi xun huan de mei ci die dai zhong tiao yong ta , li ru dang hui zhi biao zhong de xing , ke neng mei 20 xing huo mei 50 xing tiao yong yi ci 。
  shen kao zi liao :
  how to increase timeout on aspx page?
http://p2p.wrox.com/topic.asp?TOPIC_ID=7504
  asp.net neng bu neng zai ke hu duan guan bi hou zai hou tai ji xu jiang ye mian zhi xing wan bi ?
http://topic.csdn.net/u/20070202/14/85ea5576-907a-4960-9c53-b206a05228e4.html
  zai ASP.NET zhong shi yong ji shi qi (Timer)
http://blog.joycode.com/percyboy/articles/3595.aspx
  ASP.NET 2.0 zhong de yi bu ye
http://www.microsoft.com/china/msdn/library/webservices/asp.net/issuesWickedCodetoc.mspx?mfr=true
  IsClientConnected de wen ti
http://topic.csdn.net/u/20080712/19/74fa4070-84bd-4fda-a99b-ac361f874738.html
  Response.IsClientConnected yuan li he yong fa
http://blog.51ait.cn/article.asp?id=357 di yi ge di zhi bi jiao man , ke yi kan xia yi ge di zhi
http://blog.joycode.com/ghj/archive/2008/07/23/115198.aspx原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
wen ti : dang yi ge zheng zai zhi xing zhong de ASPX ye mian zhi xing dao yi ban de shi hou , liu lan qi zhong ni guan bi le zhe ge ye mian , fu wu qi duan dui ying de zhe ge ye mian de dai ma reng ran zai zhi xing me ? da an : chu fei ni dai ma li mian zuo le te shu pan duan , fou ze reng ran zheng zai zhi xing 。 zhu yi dian : 1、 ke hu duan xian shi ye mian de shi hou , hou tai yi jing zhi xing wan le de ye mian dui xiang zao yi jing bu cun zai le 。 dang ran zhe shi hou tan bu shang fu wu qi duan zhi xing bu zhi xing de wen ti le 。 2、 ye mian huan mei you fan hui , chu yu deng dai zhuang tai de shi hou 。 guan bi ASPX ye mian , cai hui she ji dao shang mian ti dao de fu wu qi duan reng ran zai zhi xing de qing kuang 。 3、 ke hu duan guan bi de shi hou gen ben bu xiang fu wu qi fa song zhi ling 。 4、 chu fei ni dai ma li mian zuo le te shu pan duan , zhe li de te shu pan duan zhi yong if(!Response.IsClientConnected) lai jian ce zhuang tai er yong dai ma zhong zhi yun xing 。 xia mian de jian dan dai ma jiu shi yan shi guan bi ye mian hou , kan shi fou reng ran zai zhi xing ? ni ke yi zai zhe ge ye mian da kai hou , huan mei you fan hui ren he xin xi de shi hou ba zhe ge ye mian guan bi , ran hou kan zhi ding mu lu xia shi fou you dui ying wen jian bei chuang jian bing tian xie nei rong 。 protected void Page_Load(object sender, EventArgs e) { StringBuilder txt = new StringBuilder(); txt.AppendLine(); txt.AppendLine(DateTime.Now.ToString("u")); txt.AppendLine("asvd"); Response.Write(DateTime.Now.ToString("u")); Response.Write("\r\n"); Thread.Sleep(50000); txt.AppendLine(DateTime.Now.ToString("u")); Response.Write(DateTime.Now.ToString("u")); Response.Write("\r\n"); // ba yi xie xin xi xie dao ling wai yi ge wen jian , jie ci cha kan shi fou zheng zai yun xing string dir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs"); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); DateTime dt = DateTime.Now; string shortfileName = string.Format("errors_{0:0000}{1:00}{2:00}.log", dt.Year, dt.Month, dt.Day); string fileName = Path.Combine(dir, shortfileName); StreamWriter sw; if (File.Exists(fileName)) sw = File.AppendText(fileName); else sw = File.CreateText(fileName); sw.Write(txt.ToString()); sw.Close(); sw = null; } zuo le te shu pan duan de qing kuang jian dan li zi : zhu yi : IsClientConnected de pan duan zai VS.net kai fa gong ju zi dai de kai fa zhan dian ASP.NET Development Server shi bu zhi chi de 。 ASP.NET Development Server yong yuan fan hui true 。 IIS cai shi zhi chi de 。 protected void Page_Load(object sender, EventArgs e) { StringBuilder txt = new StringBuilder(); for (int i = 0; i < 100; i++) { if (this.Response.IsClientConnected) { txt.AppendLine(); txt.AppendLine(DateTime.Now.ToString("u")); txt.AppendLine(i.ToString()); Response.Write(DateTime.Now.ToString("u")); Response.Write("\r\n"); Thread.Sleep(500); } else { Response.End(); return; } } txt.AppendLine(DateTime.Now.ToString("u")); Response.Write(DateTime.Now.ToString("u")); Response.Write("\r\n"); // ba yi xie xin xi xie dao ling wai yi ge wen jian , jie ci cha kan shi fou zheng zai yun xing string dir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs"); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); DateTime dt = DateTime.Now; string shortfileName = string.Format("errors_{0:0000}{1:00}{2:00}.log", dt.Year, dt.Month, dt.Day); string fileName = Path.Combine(dir, shortfileName); StreamWriter sw; if (File.Exists(fileName)) sw = File.AppendText(fileName); else sw = File.CreateText(fileName); sw.Write(txt.ToString()); sw.Close(); sw = null; } zhe ge li zi zhong shi fa xian zhong duan , jiu pao qi zhi qian zuo de ren he dong xi 。 dang ran wo men ye ke yi jian dan de xiu gai shang shu dai ma , rang ba yi jing chu li wan cheng de dong xi ji lu xia lai , lei si xia mian de dai ma protected void Page_Load(object sender, EventArgs e) { StringBuilder txt = new StringBuilder(); for (int i = 0; i < 100; i++) { if (this.Response.IsClientConnected) { txt.AppendLine(); txt.AppendLine(DateTime.Now.ToString("u")); txt.Append("********** "); txt.AppendLine(i.ToString()); Response.Write(DateTime.Now.ToString("u")); Response.Write("\r\n"); Thread.Sleep(500); } else { break; } } txt.AppendLine(DateTime.Now.ToString("u")); Response.Write(DateTime.Now.ToString("u")); Response.Write("\r\n"); // ba yi xie xin xi xie dao ling wai yi ge wen jian , jie ci cha kan shi fou zheng zai yun xing string dir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs"); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); DateTime dt = DateTime.Now; string shortfileName = string.Format("errors_{0:0000}{1:00}{2:00}.log", dt.Year, dt.Month, dt.Day); string fileName = Path.Combine(dir, shortfileName); StreamWriter sw; if (File.Exists(fileName)) sw = File.AppendText(fileName); else sw = File.CreateText(fileName); sw.Write(txt.ToString()); sw.Close(); sw = null; } xu yao zhu yi de shi , shi yong isClientConnected shi yao zhan yong yi ding de xi tong zi yuan de 。 isClientConnected shi ji shang xu yao xiang ke hu duan shu chu yi dian dong xi , ran hou cai zhi dao ke hu duan shi fou reng ran zai xian 。 zhe yang , chu fei ni de ying yong fei chang hao shi , fou ze jian yi ni bu yao yong isClientConnected 。 mian de pan duan isClientConnected shi yong de zi yuan bi ni shi ji ye wu luo ji shi yong de zi yuan huan yao duo 。 zai ren he qing kuang xia , Response.IsClientConnected dou yao you xie kai xiao , suo yi , zhi you zai zhi xing zhi shao yao yong 500 hao miao ( ru guo xiang wei chi mei miao ji shi ye de tun tu liang , zhe shi yi ge hen chang de shi jian le ) de cao zuo qian cai shi yong ta 。 zuo wei tong chang de gui ze , bu yao zai jin mi xun huan de mei ci die dai zhong tiao yong ta , li ru dang hui zhi biao zhong de xing , ke neng mei 20 xing huo mei 50 xing tiao yong yi ci 。 shen kao zi liao : how to increase timeout on aspx page? [url=http://p2p.wrox.com/topic.asp?TOPIC_ID=7504]http://p2p.wrox.com/topic.asp?TOPIC_ID=7504[/url] asp.net neng bu neng zai ke hu duan guan bi hou zai hou tai ji xu jiang ye mian zhi xing wan bi ? [url=http://topic.csdn.net/u/20070202/14/85ea5576-907a-4960-9c53-b206a05228e4.html]http://topic.csdn.net/u/20070202/14/85ea5576-907a-4960-9c53-b206a05228e4.html[/url] zai ASP.NET zhong shi yong ji shi qi (Timer) [url=http://blog.joycode.com/percyboy/articles/3595.aspx]http://blog.joycode.com/percyboy/articles/3595.aspx[/url] ASP.NET 2.0 zhong de yi bu ye [url=http://www.microsoft.com/china/msdn/library/webservices/asp.net/issuesWickedCodetoc.mspx?mfr=true]http://www.microsoft.com/china/msdn/library/webservices/asp.net/issuesWickedCodetoc.mspx?mfr=true[/url] IsClientConnected de wen ti [url=http://topic.csdn.net/u/20080712/19/74fa4070-84bd-4fda-a99b-ac361f874738.html]http://topic.csdn.net/u/20080712/19/74fa4070-84bd-4fda-a99b-ac361f874738.html[/url] Response.IsClientConnected yuan li he yong fa [url=http://blog.51ait.cn/article.asp?id=357]http://blog.51ait.cn/article.asp?id=357[/url] di yi ge di zhi bi jiao man , ke yi kan xia yi ge di zhi [url=http://blog.joycode.com/ghj/archive/2008/07/23/115198.aspx]http://blog.joycode.com/ghj/archive/2008/07/23/115198.aspx[/url]
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
清凉一夏_清纯美丽
纯白色小礼服
靓丽可人儿_嘉嘉
我的女神_靓丽女生
主题摄影
贵州,让我欢喜,让我神伤。
莫干山
天平秋色
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有