Link to home
Start Free TrialLog in
Avatar of flynny
flynnyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

debugging windows service vb.net express 2008

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.
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

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)
Avatar of flynny

ASKER

i downloaded a template file for the service from here

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

Avatar of flynny

ASKER

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?
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
Avatar of flynny

ASKER

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.
Avatar of flynny

ASKER

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?
Than there is a problem  (bug, problem) in your service.
Avatar of flynny

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of flynny

ASKER

superb thank you so muchfor all your help!