Last post Oct 12, 2017 03:16 AM by Jean Sun
Oct 10, 2017 09:47 AM|vdboots|LINK
i didn't use signal R before in projects. And would like to do the following.
Multiple users in our web application(but not all). Should get a button. That sends a message(through Signal R) to a windows Service /or console application to trigger an action.
After the Action is finished the application shoud respond to the client that its done.
Does anybody has a example code.
Oct 11, 2017 02:06 AM|Jean Sun|LINK
What's the problem do you face now?
If you are having problem with Calling the windows service from the Web Application. Here is a good article which shows how to do this, please take it as reference.
If you are having problem with how to use SignalR, please check the following tutorial.
Or you can just use ajax to achieve your requirements instead of using SiganlR.
Oct 11, 2017 06:38 AM|vdboots|LINK
Hi Thanks For your Answer,
My problem is that is that the Windows Service is on a other computer. And i cannot get one to one signals working from my frontend. I would like to trigger a action in the service.
Oct 12, 2017 03:16 AM|Jean Sun|LINK
My problem is that is that the Windows Service is on a other computer.
Please try use the following code to start windows services on remote server.
private string servicestart(string compname, string service)
ServiceController sc = new ServiceController();
sc.ServiceName = service;
sc.MachineName = compname;
string result = sc.Status.ToString();
if (sc.Status == ServiceControllerStatus.Stopped)
result = sc.Status.ToString();
// do something
string status = servicestart("computerName", "Service");
Note that : make sure you're able to start that service remotely using the current permissions and credentials.