Click here to Skip to main content
15,893,486 members
Home / Discussions / C#
   

C#

 
QuestionSystem.AccessViolationException Pin
siddy1718-Jun-09 19:13
siddy1718-Jun-09 19:13 
AnswerRe: System.AccessViolationException Pin
Christian Graus18-Jun-09 19:29
protectorChristian Graus18-Jun-09 19:29 
GeneralRe: System.AccessViolationException Pin
siddy1718-Jun-09 19:57
siddy1718-Jun-09 19:57 
GeneralRe: System.AccessViolationException Pin
Christian Graus18-Jun-09 21:28
protectorChristian Graus18-Jun-09 21:28 
QuestionGUI interface for launching a ethernet packet Pin
moniska18-Jun-09 16:55
moniska18-Jun-09 16:55 
AnswerRe: GUI interface for launching a ethernet packet Pin
Rajesh Anuhya18-Jun-09 18:11
professionalRajesh Anuhya18-Jun-09 18:11 
GeneralRe: GUI interface for launching a ethernet packet Pin
moniska21-Jun-09 16:59
moniska21-Jun-09 16:59 
QuestionWindows service Stop issue Pin
mark_me18-Jun-09 16:11
mark_me18-Jun-09 16:11 
Hi,
I have developed 2 applications.
1. Windows Service
2. Asp.net application (Control Panel for above application)
Windows Service has 3 main methods in the following manner.
method1 every 10 mins
method2 every 1hr after method 1
method3 every 3hrs after method 1 n 2.
These methods directly interacts with sql db (for timing the methods etc) and source file locations etc. These timings and locations are set via the asp.net control panel. The control panel also puts the service on and off.
My problem is that the control panel puts the service on successfully but while putting it off, it still remains running for quite a while. I think, this happens because my main method(onstart) runs in following fashion.
while(true)
{
if(method1_ellapse_time)
method1
if(method2_ellapse_time)
method2
if(method3_ellapse_time)
method3

load timing settings and source file paths
according to time settings, set method1_ellapse_time,method2_ellapse_time,method3_ellapse_time


Thread.Sleep(5sec)
//if settings are changed i want them to take effect in 5 secs
}
Stopping the service doesn't work as required because while(true) and thread.sleep.Correct me if i am wrong
Is there any better so that i can get rid of sleep and still windows service loads new settings, somehow make the process less cycles consuming and enable stopping as required. Is threading a solution? but why would any one use threading if one process is running? I want single thread exection at a time. Please provide help

Thankyou in advance
AnswerRe: Windows service Stop issue Pin
Mycroft Holmes18-Jun-09 17:57
professionalMycroft Holmes18-Jun-09 17:57 
GeneralRe: Windows service Stop issue Pin
mark_me14-Jul-09 17:29
mark_me14-Jul-09 17:29 
QuestionPhone Pin
ellllllllie18-Jun-09 12:23
ellllllllie18-Jun-09 12:23 
AnswerRe: Phone Pin
Henry Minute18-Jun-09 12:44
Henry Minute18-Jun-09 12:44 
AnswerRe: Phone Pin
Luc Pattyn18-Jun-09 13:15
sitebuilderLuc Pattyn18-Jun-09 13:15 
AnswerRe: Phone Pin
Not Active18-Jun-09 13:15
mentorNot Active18-Jun-09 13:15 
JokeRe: Phone Pin
musefan18-Jun-09 22:01
musefan18-Jun-09 22:01 
AnswerRe: Phone Pin
Christian Graus18-Jun-09 19:30
protectorChristian Graus18-Jun-09 19:30 
GeneralRe: Phone Pin
EliottA19-Jun-09 2:53
EliottA19-Jun-09 2:53 
QuestionC++ in C# Pin
Omar Gameel Salem18-Jun-09 10:11
professionalOmar Gameel Salem18-Jun-09 10:11 
AnswerRe: C++ in C# Pin
DaveyM6918-Jun-09 10:25
professionalDaveyM6918-Jun-09 10:25 
AnswerRe: C++ in C# Pin
Simon P Stevens18-Jun-09 10:28
Simon P Stevens18-Jun-09 10:28 
AnswerRe: C++ in C# Pin
Dan Neely18-Jun-09 11:05
Dan Neely18-Jun-09 11:05 
AnswerRe: C++ in C# Pin
Omar Gameel Salem18-Jun-09 11:14
professionalOmar Gameel Salem18-Jun-09 11:14 
QuestionC# windowless application for screen capture and replay Pin
parth_patel18-Jun-09 8:15
parth_patel18-Jun-09 8:15 
AnswerRe: C# windowless application for screen capture and replay Pin
Henry Minute18-Jun-09 8:40
Henry Minute18-Jun-09 8:40 
GeneralRe: C# windowless application for screen capture and replay Pin
parth_patel18-Jun-09 8:49
parth_patel18-Jun-09 8:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.