Last post Sep 14, 2020 08:37 AM by nideeshm
Sep 11, 2020 10:05 PM|msv|LINK
Hi all, I need some advice for the following issue.
I have three projects,
1. UI project (4.6.2 framework)
2. Messaging project (core 3.1 framework) (Contains REST API and SignalR project)
3. BatchProcess Project
The Messaging project will be running as a windows service. I need the signalR project to listen to port, say, 7000 and REST API to run on port 7500.
my flow is somewhat like this. From UI I will connect to SignlaR, in response I wll get the connectionId. Then I call the batch process sending the connectionId as a parameter. The Batch process run for a while and call the REST API in Messaging project
with connectionId. This API will inturn calls the signalr hub class and sends the messages to the respective client.
How should I create a windows service in .net core that listens in two different ports. suggest me or plz provide me a link.
Sep 12, 2020 10:22 AM|DA924|LINK
Of course the REST API and SignalR are Web solutions that are hosted by a Web server that I know about. I dont see how a Windows service running on the Windows desktop is supposed to be sitting there listening on any port, since it cannot host Web applications
Maybe, I am missing something.
Sep 12, 2020 03:02 PM|bruce (sqlwork.com)|LINK
Why do you want two different ports? As asp.net core apps are command line apps, it’s each to convert to a service, but why not just use iis?
Sep 14, 2020 08:37 AM|nideeshm|LINK
I guess you do not want client - server model. And you are trying to install all the application in each of the client.
Signal r is needed only when server needs to contact client. Otherwise you could do a polling mechanism by calling the server at regular intervals.
Signalr and api needs to be installed separately and should be run on separate port.
Please check if you can try