I have a Web application and a Windows Service on the same server the web application communicates with windows service by using .net remoting. Windows service checks if the connection with LDAP is working then it returns true else an exception is thrown. The status from windows service is updated on website.
Now the infrastructure is going to be changed. The web application is going on Azure and windows service will remain on client's machine (as the LDAP is on the client side). I need to update the status on the web application as doing now. I have introduced Web API as a middle layer between Web Application and Windows Service.
I can't find a better solution to achieve this scenario. I've considerations to use SignalR or Akka.remote.
What I'm thinking so far, if I use SignalR in Web API and windows service and do the following:
- Web Application consumes Web API method
- Web API method uses SignalR and sends signal to Windows Service
- Windows service checks LDAP connectivity and calls Web API method to return the status.
Note: I don't know how we can make Windows Service as a client and make it able to listen if web api sends a signal to it because i don't need to use self hosting for windows service. can we use web api as it's already hosted.
Is it achievable? or is there any better solution? Please help. Thanks in advance.