Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebSocket connection to 'wss://' failed: Unexpected response code: 500

I'm getting 500 error when running SignalR on secure websocket when running on IIS Express. Site is running on localhost:44300 with default cert. It works just fine with longPolling.

When changing to webSockets, I'm getting following error:

WebSocket connection to 
'wss://localhost:44300/signalr/connect?transport=webSockets&connectionToken='
failed: Unexpected response code: 500 

If the error is due to self-signed cert, how do I disable it with SignalR and websockets?

Or could it be caused by something else?

like image 939
Nikita Ignatov Avatar asked Aug 12 '13 03:08

Nikita Ignatov


1 Answers

I tried solving this issue with initializing EventMachine, by inserting the following code in an initializer config/initializers/eventmachine.rb:

Thread.new { EventMachine.run } unless EventMachine.reactor_running? && EventMachine.reactor_thread.alive?

and it worked for me!

like image 199
Amandeep Singh Bhamra Avatar answered Oct 20 '22 16:10

Amandeep Singh Bhamra