Port 80 and 443

Nov 12, 2011 at 11:21 PM

Hi,

 

very nice project!

What about your plans to support port 80 and 443 hosting easily?
Running on custom ports (rather than default http ports) defeats some of the purpose od WebSockets (like opening ports on firewalls).
Thanks.

Nov 13, 2011 at 2:23 AM
Edited Nov 13, 2011 at 2:25 AM

This feature has been supported already.

You can host your socket servers in SuperWebSocketService and configure the port to 80 or 443.  But you need to stop the IIS of this server because IIS will take these two ports if it is running.

Nov 13, 2011 at 9:53 AM

Hm - then I get this (for port 80 - IIS is stopped):

2011-11-13 10:50:43,191 [6] ERROR SuperWebSocket - System.Net.Sockets.SocketException (0x80004005): An attempt was made to access a socket in a way forbidden by its access permissions   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)   at System.Net.Sockets.Socket.Bind(EndPoint localEP)   at SuperSocket.SocketEngine.AsyncSocketServer`2.StartListen() in D:\Kerry\Workshop\SuperSocket\v1.4\SocketEngine\AsyncSocketServer.cs:line 1082011-11-13 10:50:43,198 [10] ERROR SuperSocket - Failed to start SuperWebSocket server!

Nov 13, 2011 at 9:55 AM
An attempt was made to access a socket in a way forbidden by its access permissions
Permission issue, please start server as Administrator or shutdown UAC.

From: [email removed]
Sent: Sunday, November 13, 2011 5:54 PM
To: [email removed]
Subject: Re: Port 80 and 443 [SuperWebSocket:279231]

From: ChristianWeyer

Hm - then I get this (for port 80 - IIS is stopped):

2011-11-13 10:50:43,191 [6] ERROR SuperWebSocket - System.Net.Sockets.SocketException (0x80004005): An attempt was made to access a socket in a way forbidden by its access permissions at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at SuperSocket.SocketEngine.AsyncSocketServer`2.StartListen() in D:\Kerry\Workshop\SuperSocket\v1.4\SocketEngine\AsyncSocketServer.cs:line 1082011-11-13 10:50:43,198 [10] ERROR SuperSocket - Failed to start SuperWebSocket server!

Nov 13, 2011 at 9:58 AM

I surely hope you are kidding :)

You are not saying to run a web/websocket server with elevated privileges, right?

Sorry, this is just plain wrong and dangerous.

 

We need another solution, i.e. incorporating http.sys (e.g. through HttpListener). This is what I was reffering to implicitly in my original post, sorry.

 

Thanks!

Nov 13, 2011 at 10:02 AM
Yes, it is a server application,
So it is required to have permission to listen the sockets.

From: [email removed]
Sent: Sunday, November 13, 2011 5:58 PM
To: [email removed]
Subject: Re: Port 80 and 443 [SuperWebSocket:279231]

From: ChristianWeyer

I surely hope you are kidding :)

You are not saying to run a web/websocket server with elevated privileges, right?

Sorry, this is just plain wrong and dangerous.

We need another solution, i.e. incorporating http.sys (e.g. through HttpListener). This is what I was reffering to implicitly in my original post, sorry.

Thanks!

Nov 13, 2011 at 10:15 AM

Now we get closer :)

We need to talk about *least* privilege: which means that the server prcoess needs permission to listen on the socket. And it does *not* mean to run elevated with full admin permission.

Do we agree? If yes, we need to find a solution.

Thanks.

Nov 15, 2011 at 8:24 PM

Hi Kerry,

any comments on my thoughts?

Nov 16, 2011 at 1:07 AM

Yes.

Nov 16, 2011 at 9:35 AM

OK, great.

Do we have a solution for hosting on port 80/443 with least privileges in the current version? It looks like we don't.
Thanks. 

Nov 16, 2011 at 9:36 AM

It should be fine if these ports have not been taken by other application like IIS.

Nov 16, 2011 at 10:04 AM

OK. Confirmed. You know what? It was SQL Server Reporting Services still running - sorry!
Good work, Kerry. 

Maybe one thing: the server should not say "The server has been started! Press key 'q' to stop the server." when it actually did not start due to socket binding problems.