Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
If I have added a service in windows, how can I add or call this service (which I have added in windows) in another project?
Posted
Updated 22-Jul-10 2:26am
v3

Dude, you need to know the difference between Windows Service & Web Service.

You sound like in a need of Web-service and trying a windows service instead.

Look here:
Simple Windows Service Sample[^]
Your first C# Web Service[^]
 
Share this answer
 
Comments
Dalek Dave 22-Jul-10 7:06am    
To be fair it took me a while to stop mixing them!
Sandeep Mewara 22-Jul-10 10:07am    
Hi Toli, If you read the original question then might be you want to re-consider it!
Hi Khaula,

Ad reference System.ServiceProcess and use the below code to call the windows service.

<br />
ServiceController myController = new ServiceController("Name of Service");<br />


And use the instace myController to do what you want.
 
Share this answer
 
v2
Comments
#realJSOP 22-Jul-10 8:39am    
It looks more like he's talking about a web service. Your comment and vote on sandeep's message is invalid, and I therefore deleted it.
Rajesh Sajjanar 22-Jul-10 13:25pm    
Ji John Simmons,

I posted my answer to call windows service from another windows project as his question tilte "Windows Service" claerly says that

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900