c# - Windows service does nothing on production PC -


I have an application that schedules jobs using quartz.net. This works entirely on my development laptop as a Winforms application (with beginner and stop buttons) and as Windows services, Outart () and OnStop () Event code matches the Start and Stop button codes of the Winforms application, they are in the same solution using the same "Model" code (in their own project).

If I run the Winforms application on the production computer then it works perfectly, jobs are executed according to them, although according to the required schedule, if I installed it as a Windows service on the production PC And does nothing to run! Jobs do not come out.

I do not know how to debug it. Please tell me if you have any suggestions that may be wrong.

Also please let me know what other information should I provide.

Oh - Dev is running PC Windows 7, the production PC is running Windows 8.1! Can this be the problem? I have created the service by following this tutorial: Does not indicate that there may be some special requirements for the deployment of Windows 8?

Can anything be done in the environment variable (which I do not know)?

This is some code that can be relevant:

Service:

  Namespace Datapamp {Public partial class DataPumpService: ServiceBase {Personal Task Manager _ Task Manager; Public DataPumpService () {InitializeComponent (); _taskManager = new task manager (); } Turn on safe override zero (string [] args) {_taskManager.Go (); } Secure Override Zero Ontop () {_taskManager.Stop (); Form code (separate project):  
  Namespace Datapamp {public partial class} form 1: form {personal task manager _ task manager = new task manager (); Public Form 1 () {Initialization (); } Private Zero Button 1_Click (Object Sender, EventArgs e) {_taskManager.Go (); // limitless loop, label does not block 1 text. "Its going on ..."; } Private Zero Button 2_Click (Object Sender, EventArgs e) {label1.Text = "Stop ..."; _taskManager.Stop (); Label1.Text = "inactive"; } Private Zero Form 1_formcling (Object Sender, FormClosingEventArgs e) {_taskManager.Stop (); Code selected by   

Task Manager code (third project which is one of the first two contexts):

  Public class works Manager {// ... Private ISCdular _scheduler = StdSchedulerFactory.GetDefaultScheduler (); // ... go public zero () (if _scheduler.GetCurrentlyExecutingJobs (). Calculation () == 0) {_scheduler.Start (); _scheduler.AddCalendar (calendar name, MacPaulicHolidayCalendar (wrong, true);); Foreign currency (Dump pump job job in Jot List) {_scheduler.ScheduleJob (MacBob (job), MacCrakrone (job))}}}} // ... public void Stop () {foreach (string name _scheduler.GetCurrentlyExecutingJobs () (J = & gt; J.Jobtitrett.k.name.)) {_scheduler.Interrupt (new job (name))}} _scheduler.Shutdown (true);} // <... << code> < / Pre> 

Where the joblist gets a Only a property that implements a list & gt; DatapumpJob & gt; / code> where DatapumpJob implies IInterrutableJob but adds a common name with a job name It is used in three ways from the beginning of the Create ... Personal methods within the TaskManager class.


This code < The comments about the code> servicebase have to answer a question. Run () :

Program.cs (auto-generated):

  Namespace Datapamp {Static class program {/// & lt; Summary & gt; Main entry point for the application /// & lt; / Summary & gt; Static Zero Main () {ServiceBase] ServicesToron; ServicesToRun = New ServiceBase [] {New DataPumpService ()}; ServiceBase.Run (ServicesToRun); }}   

}

this became a network permission issue The service was running, it was unable to reach the network drive. So my question really was mile-specified.

After doing this: We finally started working on setting the service to run it on a PC as a specific user account.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -