We help IT Professionals succeed at work.

debugging windows service vb.net express 2008

Medium Priority
1,144 Views
Last Modified: 2012-08-13
Hi can anyone help me to do this?

i found one website that tells me to go into the design view right click and select 'add installer'.

however vb 2008 express doesn't have the template so the option isn't there?

many thank

Matt.
Comment
Watch Question

Dirk HaestProject manager
CERTIFIED EXPERT

Commented:
Can you create windows services with the express edition ?
According this not: No support for creating Windows Services
http://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express#Visual_Basic_Express

(you can with a workaround, ... http://www.dotheweb.net/articles/dotnet/servicesexpress/services.aspx)

Author

Commented:
i downloaded a template file for the service from here

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4511&lngWId=10

Author

Commented:
ok following the workaround that you posted is there anyway i can change the installer (page 3) to be automatically called from within vb?

i.e.
can

installutil <dir>

be called by the program rather than using a command prompt?
Dirk HaestProject manager
CERTIFIED EXPERT

Commented:
You need to install the service first before you can start debugging it.
To install a service, you need to do this through the command prompt

Author

Commented:
ok i've tried running

installutil C:\myService.exe

and i get the error

access to the path 'c:\windows\Microsoft.Net\Framework\v2.0.50727\InstallUtil.InstallLog' is denied

any ideas how to get around this?

many thanks,

matt.

Author

Commented:
sorry i wasnt runnig  the cmd in administrator mode. its installed the service now i can see 'NewService1' in the list however when i try and start it i get the message

the newservice1 service started on Locl Computer and then stopped. Some services stop automatically if they are not in use by any other services ro programs.

any ideas what this means?
Dirk HaestProject manager
CERTIFIED EXPERT

Commented:
Than there is a problem  (bug, problem) in your service.

Author

Commented:
ok great i've manged to start the service now and as per the example it is logging the entries.

is there any way i can debug the code, i.e utilise break points, etc?
Project manager
CERTIFIED EXPERT
Commented:
How to: Debug Windows Service Applications  
http://msdn.microsoft.com/en-us/library/7a50syb3(VS.80).aspx

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
superb thank you so muchfor all your help!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.