Last post Apr 30, 2015 02:18 AM by ricNr1
Apr 08, 2015 02:54 AM|ricNr1|LINK
I was working through the tutorials and trying out the sample applications.
For example the self-hosted wpf sample found here
When I start the server application on a windows 7 machine and try to connect to it from another windows 7 machine in the LAN it works just fine.
But when I do the same on a Windows Server 2012 OS I can't connect to it. Even though the server starts without any exception.
On the client side the call:
Throws a HTTPRequestException with an Inner Exception "System.Net.WebException" with an Inner Exception "System.Net.Sockets.SocketException".
With a StackTrace
bei System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
bei System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
The Server is a virtual machine and sits inside the LAN just like the windows 7 machine (which worked). I tried to establish the connection with computer name or IP adress, but on the Windows Server OS both won't work.
When I start the server and the client application both on the windows Server with localhost it actually works. I just can't connect from outside. I already allowed the app through the firewall.
Any idea what I might be doing wrong or what else I can try?
Apr 09, 2015 12:53 AM|Edwin Guru Singh|LINK
But when I do the same on a Windows Server 2012 OS I can't connect to it. Even though the server starts without any exception
Browsers will support it because they have implemented the protocol internally, most browsers won't use the operating system transport libraries so they will be able to make use of WebSockets even if the OS does not directly support it.
HTTP.SYS prior to Windows 8/2012
has no built in support for WebSockets, so although .NET 4.5 contains WebSocket classes, they won't work unless you are running .NET 4.5+ on Windows 8/2012 and that will affect self-hosting solutions running in Windows < 8.
here to refer the similar thread which explains the self-hosted SignalR Server on Windows Server 2012
Apr 09, 2015 02:15 AM|ricNr1|LINK
Thanks for your answer.
I am not sure if I understand you correctly. From my perception you say that prior to Windows 8/2012 I have no support for WebSockets. After that I have this support.
But I experience the opposite. I can connect to a server that is self-hosted on Windows 7. But if I connect to a server that is self-hosted on a Windows Server 2013 machine, I cannot connect to it.
And when I check the supported platforms:
I should be able to connect to my Windows Server 2012
Please correct me if I'm wrong
Apr 27, 2015 11:15 AM|ricNr1|LINK
I was working on other projects for the past weeks and now I wanted to come back to this topic.
But as before I can't connect to the service when i self host it on a windows server. Can anyone try to reproduce the problem?
I want to know if I am doing something wrong, or if it is just not possible to self host on windows server.
If not, I would have to rewrite my windows-service application.
Apr 28, 2015 04:19 PM|EricO64|LINK
Similar scenario. I have a Windows 7 machine with a self-hosted server and a client, on the same machine, which will not connect. No errors thrown, just no connection. I'm using SignalR version 2.20 for this project, I haven't used it in a while and
never used to have any issues, at least like this. I think I may revert back to an earlier version and see what happens.
Apr 30, 2015 02:18 AM|ricNr1|LINK
I finally managed to establish a connection.
The problem was, that in the windows firewall I made a inbound rule for the server application.
Now removed this rule and made a new rule just for that specific port and now I can connect.