Last post Jul 29, 2019 07:21 AM by Brando ZWZ
Jul 27, 2019 06:04 AM|tinomclaren|LINK
Im new to SignalR Core.
I would like to get the chat Hub/.Net Client samples working over different IP addresses (running on localhost works fine).
Im using the Demo Chat samples from github here
PC A (my work PC) working as a SignalR Hub running the Chat Hub (192.168.0.2).
PC B (my Laptop) running the Chat 'Windows Forms Sample' Client (192.168.0.9)
Firewalls: I have allowed both Inbound and Outbound Rules for port 52995 on both PC's.
If I run the Winforms .Net client on the same PC as the Hub (localhost) then all is ok, but if run on the Laptop the error I get is:
System.Net.HttpRequestException. Response code does not indicate success: 400 (Bad Request)
For clarity the Winforms chat client app allows you to enter the url in a textbox:
http://localhost:52995/chat ----> client running on localhost -> works
http://192.168.0.2:52995/chat ----> client running on 192.168.0.9 -> error
What am I missing, why wont this work?
Jul 29, 2019 03:20 AM|Brando ZWZ|LINK
According to your description, I have created a test demo on my side, it works well.
I have try to use windowsform chat form to access the chat hub in remote computer.
The result as below:
I suggest you could try to use
fiddler to capture the details error message for 400 bad request.
More details about how to use fiddler, you could refer to below article:
Jul 29, 2019 06:22 AM|tinomclaren|LINK
Hello Brando & thank you
Can I ask, how did you setup your server hub?
I learned IIS Express only handles localhost traffic so im certain that is part of my problem, as I was running a copy of Visual Studio in a VitrualBox vm (for the server hub) so this meant VS was using IIS Express and therefore no traffic outside of localhost
& therefore the 400.
Im still struggling with the setup as my use case is a bit different.
I need to run the server hub on a windows 10 PC with a no more that a dozen or so local (LAN) clients (so its all local LAN, no cloud) . Kestral seems to be the server to use in this case, im reading the docs right now but any pointers would be appreciated.
Jul 29, 2019 07:21 AM|Brando ZWZ|LINK
I published the asp.net core signalR application to IIS10 on the local PC and access it through another computer.