supper web socket on iis can not send and receive mesage some time

Jul 11, 2012 at 3:34 PM


I host it on IIS, when connect to server , in client i got message : Connection open

But I can not send message, and receive message from another client

Some time, it work perfectly, send and receive work, some time, it's not work

Jul 11, 2012 at 3:58 PM

Could you take a look at err.log and info.log?

If you host SuperWebSocket in IIS, the websocket server's lifecircle will be same as the website application. By default, if the site have no request for a longer time, the site will be shutdown automatically.

Jul 11, 2012 at 5:14 PM


I clear err.log and info.log  and run project again,

I test in 3 client, 3 client can connect and open connection, and

The first client : can not send and receive

The second client : send and receive normally

The third client : the same with the 1st client,

The err.log is empty,

The info.log is :

2012-07-11 23:07:27,117 [4160] INFO  SuperSocket - SuperWebSocket has been started
2012-07-11 23:07:39,058 [5544] INFO  SuperWebSocket - Session: fda18b66-7f84-4f89-90a0-b3ad26a9d44b/
New SocketSession was accepted!
2012-07-11 23:07:55,215 [5544] INFO  SuperWebSocket - Session: fc3b067b-17f4-44ea-ae1c-5ba928df911d/
New SocketSession was accepted!
2012-07-11 23:08:17,710 [5544] INFO  SuperWebSocket - Session: 344f506f-4d10-4bed-b727-d30aa108ff59/
New SocketSession was accepted!
2012-07-11 23:08:42,660 [6040] INFO  SuperWebSocket - Session: fda18b66-7f84-4f89-90a0-b3ad26a9d44b/
This session was closed!
2012-07-11 23:08:42,662 [1652] INFO  SuperWebSocket - Session: 344f506f-4d10-4bed-b727-d30aa108ff59/
This session was closed!
2012-07-11 23:08:42,670 [6032] INFO  SuperWebSocket - Session: fc3b067b-17f4-44ea-ae1c-5ba928df911d/
This session was closed!
2012-07-11 23:08:42,673 [6040] INFO  SuperSocket - SuperWebSocket has been stopped

Jul 11, 2012 at 5:21 PM

Now, 3 client get the message from server, may be It's idle, may be client can not get message immediately, i don't know why ?

Jul 11, 2012 at 5:23 PM

Can you debug into the code and check more further? Then I may have idea.

Jul 12, 2012 at 2:06 AM

I run project on another laptop, I work normally,

How can I solve this ?

Jul 12, 2012 at 2:30 AM

You should have all source code of SuperWebSocket, so you can debug into the code execution.

Jul 12, 2012 at 2:42 AM

ok, I'll try it,

Thanks for your help,

Jul 12, 2012 at 10:00 AM
Edited Jul 12, 2012 at 10:23 AM

hi kerryjiang,

I deploy to my online server ,

I add some code to   SuperSocket.SocketEngine/AsyncSocketServer.cs

private void StartListen()

AppServer.Logger.LogError("Before bind : " + this.EndPoint.ToString());
                AppServer.Logger.LogError("bind complete : " + this.EndPoint.ToString());


I'm set up server by programming :


socketServer.Setup(new RootConfig(),
            new ServerConfig
                Name = "SuperWebSocket",
                Ip = Ip,
                Port = Port,
                Mode = SocketMode.Async
            }, SocketServerFactory.Instance);


and err.log is :

2012-07-12 15:56:38,759 [1468] ERROR SuperWebSocket - Before bind : ip:port
2012-07-12 15:56:38,759 [1468] ERROR SuperWebSocket - this.EndPoint : ip:port
2012-07-12 15:56:38,759 [1468] ERROR SuperWebSocket - System.Net.Sockets.SocketException (0x80004005): The requested address is not valid in its context
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at SuperSocket.SocketEngine.AsyncSocketServer`2.StartListen()

Jul 12, 2012 at 10:10 AM

OH, why you listen that IP??

You NEED NOT change the code of SuperSocket/SuperWebSocket, this kind error would be logged automatically!

Jul 12, 2012 at 10:15 AM
Edited Jul 12, 2012 at 10:22 AM

My domain is xxxx

What IP  i need to listen to ???  please help me solve that

Jul 12, 2012 at 10:17 AM

Check you network adapter!

It's not affairs of SuperSocket/SuperWebSocket, could learn some basic network knowledge by yourself?

Jul 12, 2012 at 10:23 AM

okay kerryjian, Thanks for your help

Jul 16, 2012 at 8:05 AM

hi kerryjian , the server was start,

It work on Firefox ,   and didn't work on chrome , in chrome I see  Connection open  , but can not send and receive message, my chrome version is 20.0.1132.57 m

You can check at :

Jul 16, 2012 at 8:12 AM

hi kerryjian,  I test on my friend computer, It work on chrome,