All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
如何制作圆角表格_[Html教程]
Asp.net,MVC2.0初级教程-显示列表和内容页_[Asp.Net教程]
在asp.net2.0页面部分缓存中使用ControlCachePolicy类
.NET技巧,如何实现ASP.NET网站个性化?_.net资料_编程技术
javascript,编写的文字放大效果_JavaScript技术_编程技术
PHP编程中操作目录和文件总结_[PHP教程]
ASP.NET实现中文汉字验证码_[Asp.Net教程]
SQL,Server,2005数据库开发概述(2)_[SQL,Server教程]
LINQ体验(13)——LINQ,to,SQL语句之运算符转换和ADO.NET_[Asp.Net教程]
小结:PHP动态网页程序优化及高效提速问题_php资料_编程技术
Reading number is top 10 pictures
29 the belle stars after bath figure1
Ashlynn Brooke show proud chest measurement3
A man's favorite things8
From China fortress sora aoi5
Men's and women's orgasms
The real super beauty4
Forced sex girl living abroad2
10 powerless things in life
小学生作文又现神作,你不得不佩服
西游日记4
Download software ranking
Sora aoi, the maid, students' uniforms
Rio big adventure
VC++6.0培训教程
Boxer's Top ten classic battle8
Twenty piece of palm leaf
变速齿轮3.26
Boxer vs Yellow4
The Bermuda triangle3
dreamweaver8中文版
仙剑奇侠传98版歌曲
aaa published in(发表于) 2013/12/18 8:10:25 Edit(编辑)
在VS2005中调试Windows,Service_.net资料_编程技术

在VS2005中调试Windows,Service_.net资料_编程技术

在VS2005中调试Windows Service_.net资料_编程技术-你的首页-uuhomepage.com

  1. MSDN推荐的方法


  1.1、调试windows服务的初始化、启动


  另写一个程序控制服务的初始化和启动


  注意:OnStart里写Log, OnStart里要在30秒返回. 不然启动就失败了! 所以OnStart里不要放太多代码! 可以用异步或线程.


  1.2、调试windows服务的其他方面


  1 ) 安装您的服务 : intallutils xx.exe


  2) 可从“服务控制管理器”、“服务器资源管理器”或代码启动服务


  3) vs: 设置相关断点,启动调试,再在工具栏中选择 调试->附加到进程..., 选择您的服务, 确定。


  2、trace方法


  2.1、添加调试方法


private static void DebugRun(string[] args)
{
 /*
 初始化服务
 OnStart();
 Console.ReadLine();
 OnStop();
 */
}


  2.2、改写程序入口为如下:


public static void Main(string[] args)
{
 #if DEBUG
  DebugRun(args);
 #else
  /*
  初始化服务
  */
 #endif
}


  2.3、加入2种调试代码


EventLog.WriteEntry("...");
System.Diagnostics.Debug.WriteLine("...");





添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.