cancel
Showing results for 
Search instead for 
Did you mean: 

Windows Services In SAP

Former Member
0 Kudos

Hai To All,

I want to use windows services in my Addon, so i created one addon and inside i use services1. While i run my project its getting an error.

Does Anyone have idea about that??

Iam using vb.net code, SAP B1 Version 2005B PL 39

Regards,

Anitha

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Anitha,

Can u please tell what the error is..?? And did u add the all the required references for accesing the required service..?

Vasu Natari.

Former Member
0 Kudos

Thanks for ur reply,

I didt add any dll or any references. but if i run that as a seperate project its working well. But if i add to my addon its not working. Debugger error is trigerring....

Regards,

Anitha

Former Member
0 Kudos

Just check the reference in both the projects and also the correct name spaces are used or not..??? Can u post the exact error...??

For using windows services i guess u need to all the required references and namespaces.

Vasu Natari.

Edited by: vasu natari on Sep 9, 2008 7:51 AM

Former Member
0 Kudos

This is the error i got

Cannot start service from the command line or a debugger. A Windows Service must first be installed(using installutil.exe) and then started with the ServerExplorer, Windows Services Administrative tool or the NET START command.

Regards,

Anitha

Former Member
0 Kudos

Is the required service started and running...??

What service are u using.. ? Just check if its started and running and then debug ur code..

Vasu Natari.

Former Member
0 Kudos

Thanks for ur immediate reply vasu,

I have a doubt on that, in my addon i have one module,2 or more classes, Service1,Projectinstaller.

The main is module the execution starts from there....But when the serivec will start????

Regards,

Anitha

Former Member
0 Kudos

Anitha,

What is the service that ur using.. Did u check if its started before using.??

Just Open the services window and check its status.

r u starting the service if its stopped in ur code..??

Vasu Natari.

P.S:: To access the service window type services.msc in run menu.

Former Member
0 Kudos

S vasu i checked with services before i run the project there is no services like that.....

I think, before running the exe of that project i have to do install process in command prompt. Becoz of that i got tht error.

Regards,

Anitha

Edited by: ani nazir on Sep 9, 2008 11:52 AM

Former Member
0 Kudos

R u creating a new service...?? or using an existing one. Can u post ur code where ur getting the error and where the service is used in code..

Vasu Natari.

Former Member
0 Kudos

Hi Ani

For testing a service, you must have to build a project which is not a service, just for testing. This must have to be a class....

When everything is fine, you then you can put the class into a new service.

For installing in .NET 2 after the installer, you must have to call InstallUtil.exe [servicename] (standard part of .NET framework in the base directory) which will install the service for the target machine.

For removing: stop the service, and call InstallUtil.exe /u [servicename] before running the uninstaller.

I Promise this will help you.

regards,

J.