| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> asp >> asp.net zi dong zhi xing ren wu - jie jue ying yong chi hui shou wen ti

asp.net zi dong zhi xing ren wu - jie jue ying yong chi hui shou wen ti

2008-11-11 08:01:04 编辑來源:互联网 评论
 
 
 
本文为【asp.net自动执行任务-解决应用池回收问题】的拼音翻译版
  zai fu duo de ye wu ying yong cheng xu zhong , you shi hou hui yao qiu yi ge huo zhe duo ge ren wu zai yi ding de shi jian huo zhe yi ding de shi jian jian ge nei ji hua jin xing , bi ru ding shi bei fen huo tong bu shu ju ku , ding shi fa song dian zi you jian , ding qi chu li yong hu zhuang tai xin xi , zhi fu xi tong zhong ding qi tong bu yi chang zhang dan deng deng , wo men cheng zhi wei ji hua ren wu 。 shi xian ji hua ren wu de fang fa ye you hen duo , ke yi cai yong SQLAgent zhi xing cun chu guo cheng , cai yong Windows ren wu tiao du cheng xu lai shi xian , ye ke yi shi yong Windows fu wu lai wan cheng wo men de ji hua ren wu , zhe xie fang fa dou shi bu cuo de jie jue fang an 。 dan shi , yi shang zhe xie dou xu yao you fu wu qi de quan xian cai neng jin xing , er dui yu xu ni zhu ji ke hu shi yong de Web ying yong cheng xu lai shuo , zhe xie fang fa shi xian qi lai bing bu shi hen jian dan de , zhu ji fu wu ti gong shang huo zhe bu neng zhi jie ti gong zhe yang de fu wu , huo zhe xu yao ni zhi fu xu duo e wai de fei yong 。 kan guo yi xie zhe fang mian de wen zhang , fa xian you yi ge gong tong de que dian :IIS yun xing dao yi ding shi qi , ji hua ren wu jiu ting zhi le 。 cha zhao yuan yin fa xian shi IIS de ying yong cheng xu chi ding qi hui shou dao zhi ji hua ren wu ting zhi 。 ben wen de zhe ge fang fa ke yi jie jue ying yong cheng xu chi hui shou wen ti 。
  qing kan dai ma :
  Global.asax.cs
  using System;
  using System.Data;
  using System.Configuration;
  using System.Collections;
  using System.Web;
  using System.Web.Security;
  using System.Web.SessionState;
  using System.Timers;
  using System.Net;
  using System.IO;
  using System.Text;
  using System.Threading;
  // shou ji zhu ti http://www.qumiao.com
  //Email:haolinks#163.com
  //Author: man bu tian mi
  namespace qumiao.com
  {
   public class Global : System.Web.HttpApplication
   {
   protected void Application_Start(object sender, EventArgs e)
   {
   // ding yi ding shi qi
   System.Timers.Timer myTimer = new System.Timers.Timer(5000);
   myTimer.Elapsed += new ElapsedEventHandler(myTimer_Elapsed);
   myTimer.Enabled = true;
   myTimer.AutoReset = true;
   }
   void myTimer_Elapsed(object source, ElapsedEventArgs e)
   {
   try
   {
   Log.SaveNote(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":AutoTask is Working!");
   YourTask();
   }
   catch (Exception ee)
   {
   Log.SaveException(ee);
   }
   }
   void YourTask()
   {
   // zai zhe li xie ni xu yao zhi xing de ren wu
   }
   protected void Application_End(object sender, EventArgs e)
   {
   Log.SaveNote(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":Application End!");
   // xia mian de dai ma shi guan jian , ke jie jue IIS ying yong cheng xu chi zi dong hui shou de wen ti
   Thread.Sleep(1000);
   // zhe li she zhi ni de web di zhi , ke yi sui bian zhi xiang ni de ren yi yi ge aspx ye mian shen zhi bu cun zai de ye mian , mu de shi yao ji fa Application_Start
   //string url = "http://www.qumiao.com"; shou ji zhu ti
   string url = "http://localhost:82/111.aspx";
   HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url);
   HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();
   Stream receiveStream = myHttpWebResponse.GetResponseStream();// de dao hui xie de zi jie liu
  
   }
   }
  }
  
  yuan li :Global.asax ke yi shi asp.net zhong ying yong cheng xu huo hui hua shi jian chu li cheng xu , wo men yong dao le Application_Start( ying yong cheng xu kai shi shi jian ) he Application_End( ying yong cheng xu jie shu shi jian )。 dang ying yong cheng xu kai shi shi , qi dong yi ge ding shi qi , yong lai ding shi zhi xing ren wu YourTask() fang fa , zhe ge fang fa li mian ke yi xie shang xu yao tiao yong de luo ji dai ma , ke yi shi dan xian cheng he duo xian cheng 。 dang ying yong cheng xu jie shu shi , ru IIS de ying yong cheng xu chi hui shou , rang asp.net qu fang wen dang qian de zhe ge web di zhi , ben di ce shi de shi hou xie ben di di zhi , ru http://localhost:82/111.aspx, dao zheng shi sheng chan huan jing , ke yi gai cheng ni de web di zhi , ru shou ji zhu ti http://www.qumiao.com http://www.devdao.com deng 。 zhe li xu yao fang wen yi ge aspx ye mian , zhe yang jiu ke yi chong xin ji huo ying yong cheng xu 。Log lei shi yi ge ji lu ri zhi de yi ge lei , xia mian shi ce shi shi sheng cheng de ri zhi xin xi :
  ================================================================
  2008-10-30 17:46:10:AutoTask is Working!
  2008-10-30 17:46:15:AutoTask is Working!
  2008-10-30 17:46:20:AutoTask is Working!
  2008-10-30 17:46:23:Application End!
  2008-10-30 17:46:29:AutoTask is Working!
  2008-10-30 17:46:34:AutoTask is Working!
  cong ri zhi zhong fa xian , dang shou dong hui shou IIS de ying yong cheng xu chi zhi hou , ji hua ren wu huan zai zhi xing , shuo ming wo men de mu de da dao le 。
  ru guo jiang Application_End zhong de dai ma zhu shi diao , hui fa xian Application End zhi hou , ji hua ren wu ting zhi gong zuo le , ru xia :
  ================================================================
  2008-10-30 18:01:34:AutoTask is Working!
  2008-10-30 18:01:39:AutoTask is Working!
  2008-10-30 18:01:44:AutoTask is Working!
  2008-10-30 18:01:46:Application End!
  ju xian xing : ke yi jie jue ying yong cheng xu chi zi dong huo zhe shou dong hui shou , dan shi wu fa jie jue IIS chong qi huo zhe web fu wu qi chong qi de wen ti , dang ran zhe zhong qing kuang chu xian de shi hou bu duo , er qie ru guo you ren fang wen ni de wang zhan de shi hou , you hui zi dong ji huo ji hua ren wu le 。
  dai ma xia zai :http://www.qumiao.com/down/autotask.rar
  yi dian xiao xiao de jing yan yu da jia fen xiang , huan ying da jia gai jin he zhuan zai 。 zuo wei dui zuo zhe de gu li , xi wang bao liu ban quan xin xi , bu sheng gan ji !【原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

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

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

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

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

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

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

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

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

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

 
 
zai fu duo de ye wu ying yong cheng xu zhong , you shi hou hui yao qiu yi ge huo zhe duo ge ren wu zai yi ding de shi jian huo zhe yi ding de shi jian jian ge nei ji hua jin xing , bi ru ding shi bei fen huo tong bu shu ju ku , ding shi fa song dian zi you jian , ding qi chu li yong hu zhuang tai xin xi , zhi fu xi tong zhong ding qi tong bu yi chang zhang dan deng deng , wo men cheng zhi wei ji hua ren wu 。 shi xian ji hua ren wu de fang fa ye you hen duo , ke yi cai yong SQLAgent zhi xing cun chu guo cheng , cai yong Windows ren wu tiao du cheng xu lai shi xian , ye ke yi shi yong Windows fu wu lai wan cheng wo men de ji hua ren wu , zhe xie fang fa dou shi bu cuo de jie jue fang an 。 dan shi , yi shang zhe xie dou xu yao you fu wu qi de quan xian cai neng jin xing , er dui yu xu ni zhu ji ke hu shi yong de Web ying yong cheng xu lai shuo , zhe xie fang fa shi xian qi lai bing bu shi hen jian dan de , zhu ji fu wu ti gong shang huo zhe bu neng zhi jie ti gong zhe yang de fu wu , huo zhe xu yao ni zhi fu xu duo e wai de fei yong 。 kan guo yi xie zhe fang mian de wen zhang , fa xian you yi ge gong tong de que dian :IIS yun xing dao yi ding shi qi , ji hua ren wu jiu ting zhi le 。 cha zhao yuan yin fa xian shi IIS de ying yong cheng xu chi ding qi hui shou dao zhi ji hua ren wu ting zhi 。 ben wen de zhe ge fang fa ke yi jie jue ying yong cheng xu chi hui shou wen ti 。 qing kan dai ma : Global.asax.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.SessionState; using System.Timers; using System.Net; using System.IO; using System.Text; using System.Threading; // shou ji zhu ti [url=http://www.qumiao.com]http://www.qumiao.com[/url] //Email:haolinks#163.com //Author: man bu tian mi namespace qumiao.com { public class Global : System.Web.HttpApplication { protected void Application_Start(object sender, EventArgs e) { // ding yi ding shi qi System.Timers.Timer myTimer = new System.Timers.Timer(5000); myTimer.Elapsed += new ElapsedEventHandler(myTimer_Elapsed); myTimer.Enabled = true; myTimer.AutoReset = true; } void myTimer_Elapsed(object source, ElapsedEventArgs e) { try { Log.SaveNote(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":AutoTask is Working!"); YourTask(); } catch (Exception ee) { Log.SaveException(ee); } } void YourTask() { // zai zhe li xie ni xu yao zhi xing de ren wu } protected void Application_End(object sender, EventArgs e) { Log.SaveNote(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":Application End!"); // xia mian de dai ma shi guan jian , ke jie jue IIS ying yong cheng xu chi zi dong hui shou de wen ti Thread.Sleep(1000); // zhe li she zhi ni de web di zhi , ke yi sui bian zhi xiang ni de ren yi yi ge aspx ye mian shen zhi bu cun zai de ye mian , mu de shi yao ji fa Application_Start //string url = "[url=http://www.qumiao.com]http://www.qumiao.com[/url]"; shou ji zhu ti string url = "[url=http://localhost:82/111.aspx]http://localhost:82/111.aspx[/url]"; HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url); HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse(); Stream receiveStream = myHttpWebResponse.GetResponseStream();// de dao hui xie de zi jie liu } } } yuan li :Global.asax ke yi shi asp.net zhong ying yong cheng xu huo hui hua shi jian chu li cheng xu , wo men yong dao le Application_Start( ying yong cheng xu kai shi shi jian ) he Application_End( ying yong cheng xu jie shu shi jian )。 dang ying yong cheng xu kai shi shi , qi dong yi ge ding shi qi , yong lai ding shi zhi xing ren wu YourTask() fang fa , zhe ge fang fa li mian ke yi xie shang xu yao tiao yong de luo ji dai ma , ke yi shi dan xian cheng he duo xian cheng 。 dang ying yong cheng xu jie shu shi , ru IIS de ying yong cheng xu chi hui shou , rang asp.net qu fang wen dang qian de zhe ge web di zhi , ben di ce shi de shi hou xie ben di di zhi , ru [url=http://localhost:82/111.aspx]http://localhost:82/111.aspx[/url], dao zheng shi sheng chan huan jing , ke yi gai cheng ni de web di zhi , ru shou ji zhu ti [url=http://www.qumiao.com]http://www.qumiao.com[/url] [url=http://www.devdao.com]http://www.devdao.com[/url] deng 。 zhe li xu yao fang wen yi ge aspx ye mian , zhe yang jiu ke yi chong xin ji huo ying yong cheng xu 。Log lei shi yi ge ji lu ri zhi de yi ge lei , xia mian shi ce shi shi sheng cheng de ri zhi xin xi : ================================================================ 2008-10-30 17:46:10:AutoTask is Working! 2008-10-30 17:46:15:AutoTask is Working! 2008-10-30 17:46:20:AutoTask is Working! 2008-10-30 17:46:23:Application End! 2008-10-30 17:46:29:AutoTask is Working! 2008-10-30 17:46:34:AutoTask is Working! cong ri zhi zhong fa xian , dang shou dong hui shou IIS de ying yong cheng xu chi zhi hou , ji hua ren wu huan zai zhi xing , shuo ming wo men de mu de da dao le 。 ru guo jiang Application_End zhong de dai ma zhu shi diao , hui fa xian Application End zhi hou , ji hua ren wu ting zhi gong zuo le , ru xia : ================================================================ 2008-10-30 18:01:34:AutoTask is Working! 2008-10-30 18:01:39:AutoTask is Working! 2008-10-30 18:01:44:AutoTask is Working! 2008-10-30 18:01:46:Application End! ju xian xing : ke yi jie jue ying yong cheng xu chi zi dong huo zhe shou dong hui shou , dan shi wu fa jie jue IIS chong qi huo zhe web fu wu qi chong qi de wen ti , dang ran zhe zhong qing kuang chu xian de shi hou bu duo , er qie ru guo you ren fang wen ni de wang zhan de shi hou , you hui zi dong ji huo ji hua ren wu le 。 dai ma xia zai :[url=http://www.qumiao.com/down/autotask.rar]http://www.qumiao.com/down/autotask.rar[/url] yi dian xiao xiao de jing yan yu da jia fen xiang , huan ying da jia gai jin he zhuan zai 。 zuo wei dui zuo zhe de gu li , xi wang bao liu ban quan xin xi , bu sheng gan ji !
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
情人节的清纯女生(9)
情人节的清纯女生(8)
情人节的清纯女生(7)
情人节的清纯女生(6)
山东蓬莱海边组照
一探哲蚌 II
一探哲蚌 III
古长城的一角
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有