The service on local computer started and then stopped The service on local computer started and then stopped. some services stop automatically if they have no work to do,for example,the performance logs and alerts service.why? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我在server上安装了个service,但是在不能够启动,一启动就报上面的错误。什么原因呢?怎么解决呢? private void InitializeComponent() { this.timer1 = new System.Timers.Timer(); ((System.ComponentModel.ISupportInitialize)(this.timer1)).BeginInit(); // // timer1 // this.timer1.Enabled = true; this.timer1.Interval = 60000; this.timer1.Elapsed += new System.Timers.ElapsedEventHandler(this.timer1_Tick); // // UpdateUserService // this.ServiceName = "UpdateUserService"; ((System.ComponentModel.ISupportInitialize)(this.timer1)).EndInit(); }protected override void OnStart(string[] args) { // TODO: 在此处添加代码以启动服务。 this.timer1.Enabled = true; log("WindowsServiceLog: Service Started."); } protected override void OnStop() { // TODO: 在此处添加代码以执行停止服务所需的关闭操作。 this.timer1.Enabled = false; log("WindowsServiceLog: Service Stopped."); } protected void timer1_Tick(object sender, EventArgs e) { //log("*************" + System.DateTime.Now); if (System.DateTime.Now.Hour == 14 && System.DateTime.Now.Minute==50) // if (System.DateTime.Now.Hour == 20) { doExcel(); } } protected void doExcel() { ........ } 我在事件查看器中查不到这个service. 菜鸟求助~ 关于tabcontrol选择的简单问题 比较字符串 综合类,前沿技术问题(2005+2005) 每个网页上都想要个查询、筛选、打印、下载的功能,请下载指明前进的方面。 (高分求救)那位高手做过类似这样的项目!!!!!···!·!·@@@@@@@@ 关于dateTimePicker的有关问题 rational xde professional的安装程序说我没有vs,极度郁闷 请大家来谈谈。关于多人合作。 键盘事件和删除控件问题。请教,急。 c# vb ultraCombo或ultraComboEditor控制下拉列表一直显示
private void InitializeComponent()
{
this.timer1 = new System.Timers.Timer();
((System.ComponentModel.ISupportInitialize)(this.timer1)).BeginInit();
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 60000;
this.timer1.Elapsed += new System.Timers.ElapsedEventHandler(this.timer1_Tick);
//
// UpdateUserService
//
this.ServiceName = "UpdateUserService";
((System.ComponentModel.ISupportInitialize)(this.timer1)).EndInit(); }protected override void OnStart(string[] args)
{
// TODO: 在此处添加代码以启动服务。
this.timer1.Enabled = true;
log("WindowsServiceLog: Service Started.");
} protected override void OnStop()
{
// TODO: 在此处添加代码以执行停止服务所需的关闭操作。
this.timer1.Enabled = false;
log("WindowsServiceLog: Service Stopped.");
} protected void timer1_Tick(object sender, EventArgs e)
{
//log("*************" + System.DateTime.Now);
if (System.DateTime.Now.Hour == 14 && System.DateTime.Now.Minute==50)
// if (System.DateTime.Now.Hour == 20)
{
doExcel();
}
} protected void doExcel()
{
........
}