1

I have a question about websocket and asp.net core.

I build my application with this tutorial ( Link ) , it works on my local host : 'ws://localhost:1602/ws' and on server when I open webpage from remote desktop on server. but when I open webpage with Url from my computer it show me this error :

WebSocket connection to 'ws://subdomain.domain.com/ws' failed: Error during WebSocket handshake: Incorrect 'Sec-WebSocket-Accept' header value. 

I mean when i open webpage on domainit fails.

I added WebSocket on server but error still remains.

thank you for your help.

1 Answer 1

3

It could be due a proxy issue. That is exactly the mission of Sec-WebSocket-Accept header, to prevent giving the connection as opened when the response is a cached one from a proxy, since only the real WebSocket server will know how to create that header right.

Switch to HTTPS and WSS and the problem will probably go away, since proxies cannot cache secure connections.

How HTML5 Web Sockets Interact With Proxy Servers

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.