Hi SmartFoxServer Support Team,
I'm trying to connect to my server via WSS from WebGL, I added the certification successfully.
However, the connection has been rejected as the below content:
Websocket request rejected. Received: TEXT, Required: Byte[], Session will be closed.
What's the root cause of rejected reason ?
Thank you.
Websocket request rejected
Re: Websocket request rejected
HI,
it looks like you're using the wrong protocol.
The server is expecting a binary protocol but the client is sending text.
You can either switch the configuration on the server side (to force Text) or pass a parameter in the constructor of the API to use the binary protocol. Unless you're using an older version of the API we recommend using the binary protocol.
See here:
http://docs2x.smartfoxserver.com/api-do ... 8515dc.htm
Hope it helps
it looks like you're using the wrong protocol.
The server is expecting a binary protocol but the client is sending text.
You can either switch the configuration on the server side (to force Text) or pass a parameter in the constructor of the API to use the binary protocol. Unless you're using an older version of the API we recommend using the binary protocol.
See here:
http://docs2x.smartfoxserver.com/api-do ... 8515dc.htm
Hope it helps
Re: Websocket request rejected
Thank you Lapo.
My issue was fixed by changing the UseWebSocket from WSS to WSS_BIN.
Have you ever tried Cloudflare for WSS ?
Thank you so much for your support.
My issue was fixed by changing the UseWebSocket from WSS to WSS_BIN.
Have you ever tried Cloudflare for WSS ?
Thank you so much for your support.
Re: Websocket request rejected
ducbot wrote:Thank you Lapo.
My issue was fixed by changing the UseWebSocket from WSS to WSS_BIN.
Good to hear that
Have you ever tried Cloudflare for WSS ?
I am not sure what you mean by that. Can you elaborate?
Thanks
-
- Posts: 1
- Joined: 16 May 2019, 11:07
Re: Websocket request rejected
Hi there,
I am also getting the same error, the thing is I m also using UseWebSocket.WS as I have an older version of C# client API (1.7.2) and it doesn't have binary structs (UseWebSocket.WS_BIN) . I have tried to replace it with the latest version(1.7.12) but it seem that it doesn't get fit in to my code as it is giving me an error and doesn't compiles the project. The error message is given below.
It will be so kind of you if u will help me sort out this problem. Thanks in advance.
I am also getting the same error, the thing is I m also using UseWebSocket.WS as I have an older version of C# client API (1.7.2) and it doesn't have binary structs (UseWebSocket.WS_BIN) . I have tried to replace it with the latest version(1.7.12) but it seem that it doesn't get fit in to my code as it is giving me an error and doesn't compiles the project. The error message is given below.
.The primary reference "SmartFox2X" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.
It will be so kind of you if u will help me sort out this problem. Thanks in advance.
Re: Websocket request rejected
jahanzaibkhan wrote:Hi there,
I am also getting the same error, the thing is I m also using UseWebSocket.WS as I have an older version of C# client API (1.7.2) and it doesn't have binary structs (UseWebSocket.WS_BIN) . I have tried to replace it with the latest version(1.7.12) but it seem that it doesn't get fit in to my code as it is giving me an error and doesn't compiles the project. The error message is given below..The primary reference "SmartFox2X" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.
It will be so kind of you if u will help me sort out this problem. Thanks in advance.
In order to use our latest API, you have to change the Scripting Runtime Version in the configuration of your project to ".NET 4.x Equivalent".
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Who is online
Users browsing this forum: No registered users and 68 guests