Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
I'm pretty new on SignalR, I've Self-Hosted a signalR at
http://localhost:8080
Let's say my computer's IP is 192.15.15.15. I Need my client to connect to this host, with IP Address like http://192.15.15.15/signalr but when I try to connect I get the error
Bad Request - Invalid Hostname
HTTP Error 400. The request hostname is invalid.

following line works fine
http://localhost/signalr. But I have to host it with localhost.
Any help will be appreciated, I'm badly stuck on this..
Posted
Updated 31-Jan-20 2:04am
Comments
kellyapt1 25-Aug-15 13:59pm    
How are you hosting that code - how do you have it deployed on your machine? Do you have the necessary ports open on your machine?

Well figured it out. all you need to do is to place a * in the place of IP address. Thus hosting signalr server to this ip address. https://*;
 
Share this answer
 
The local computer IP address is not accessible from any application running on same computer.

If you have published the SignalR on IIS, then using the IP address you mentioned, it is possible to access the server in LAN.

If you want to access "localhost" on same computer, then simply replace "localhost" with ip address "127.0.0.1". This ip address is reserved for localhost and to be used only by local applications to access server.

For more information on "localhost" go through article;
localhost - Wikipedia, the free encyclopedia[^]
 
Share this answer
 

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