473,467 Members | 2,399 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Windows service debugging Problem

Hi All,

I have some problem regarding Windows Service debugging for which I didn't get any answer in any post.

I have installed windows service and try to debug it by using Debug-->Attach to Process menu of Visual Studio. In this service there are timer control whose time is set at intervel of 1 min. Problem is when first time timer controls evens is fired after that one pop comes in my screen with message as "you cannot start service from command line of debugger" with Ok button. Once we click that Ok button debugging get stopped. If anyone of you have any solution regarding it please help.
Nov 3 '10 #1
1 1488
you need to execute a new thread in the timer event to execute the code in. Then you can debug the thread without worrying about the timer firing again and forcing you to stop the debugging.

Thread newThread = new Thread(new ThreadStart(someClass.GetSomeThing));
newThread.Name = "someDynamicName";
newThread.Start();
Nov 3 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Buzz Bonner | last post by:
Hi, We have developed a distributed system that uses multiple .NET remoting servers hosted by Windows Services. However, the single server used for performing all database access using ADO.NET...
3
by: Scott H | last post by:
Hello, I'm having a go at writing my first Windows Service in VB.NET and I'm having a problem. I have it installed ok and started the service sucessfully, I can stop it, and restart it fine, the...
3
by: adasilva | last post by:
I have create a Windows service that uses a timer to access a Web Service. The service is set to start Automatically and its using the local system account. The service also logs events to the...
7
by: HeatherS | last post by:
We are having issues with our windows services using memory and never releasing it. We have one service that has a file watcher which takes an xml file, inserts some records into a database, and...
0
by: bthubbard | last post by:
Hello All, I've run into a bit of an issue and I was hoping that someone here could help me. I have inherited a Windows Service written in .Net 2.0 (C#) from a previous employee. It build...
0
by: Taduri | last post by:
Hi, I am creating a windows service that will process exe file( Developed in VB and connects to database using DSN and sa/master login). When service process exe I am getting Database (Sql Server...
1
by: Proogeren | last post by:
Hi I have a service that seems to work fine but somethimes crashes on mysql operations. I get errors like System.NullReferenceException: Object reference not set to an instance of an object. ...
0
by: melbenmartin | last post by:
I have to write a Windows Service that will check my my database for fresh request to be processed . At the same time user can cancel the request using request ID. This service will run every 10...
2
by: Cappamontana | last post by:
Hi, We have a .Net project containing 1 Windows Application and 3 Windows services. The project is quite complex and is still in development. The services can be started and stopped by using the...
3
by: Mika M | last post by:
I'm programming quite simple Windows Service using C# 2005. I also made setup for it into same solution. When I run setup to install service, it's going fine into C:\Program Files\MyCompany\My...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.