Debugging Windows Service
- From: "Derek Hart" <derekmhart@xxxxxxxxx>
- Date: Sat, 2 Dec 2006 13:05:15 -0800
As a newbie to Windows Service programming in VB.Net, I need some
clarification. I am writing a Windows Service that works with SQL Server. It
works fine as a console application, but when I run it as a service it is
having problems. I want to be able to debug it, so I placed this code in
the OnStart routine which allows me to break into the code:
System.Diagnostics.Debugger.Launch()
System.Diagnostics.Debugger.Break()
It looks like the only way I am allowed to debug the process is setting the
logon in the service (once it is installed of course) to the Local System
Account and choosing "Allow service to interact with desktop." But it looks
as if Local System does not have access to SQL Server, as I am getting an
"Unable To Connect To Server" error. Should Local System have access?
Derek
.
- Follow-Ups:
- Re: Debugging Windows Service
- From: Dave Sexton
- Re: Debugging Windows Service
- From: Kevin Spencer
- Re: Debugging Windows Service
- Prev by Date: Installing Apps
- Next by Date: Re: Dotnet 1.1 in Vista
- Previous by thread: Installing Apps
- Next by thread: Re: Debugging Windows Service
- Index(es):
Relevant Pages
|