signalr使用websocket報500錯誤
阿新 • • 發佈:2018-06-21
onf targe AR awr fdn ons CI 解決 LG signalr使用websocket報500錯誤,
WebSocket connection to ‘ws://localhost:22862/signalr/connect?transport=webSockets&clientProtocol=1.5&connectionToken=Ab7SuqLggw%2BJL5kWeWcdv%2FI%2FdnRcikASgBnVNnsJu1qtIGq5tV7iXvQkDim%2FYFCJ9RNJvWTe9Zgjte2siJz2KXHX3n8ERyw48QqtkOF2awR4s%2BWIMsj8OZve%2FmJYsK1a&connectionData=%5B%7B%22name%22%3A%22myhub%22%7D%5D&tid=3‘
failed: Error during WebSocket handshake: Unexpected response code: 500
WebSocket connection to ‘ws://localhost:22862/signalr/connect?transport=webSockets&clientProtocol=1.5&connectionToken=Ab7SuqLggw%2BJL5kWeWcdv%2FI%2FdnRcikASgBnVNnsJu1qtIGq5tV7iXvQkDim%2FYFCJ9RNJvWTe9Zgjte2siJz2KXHX3n8ERyw48QqtkOF2awR4s%2BWIMsj8OZve%2FmJYsK1a&connectionData=%5B%7B%22name%22%3A%22myhub%22%7D%5D&tid=3‘
解決方法如下:
服務端webconfig的httpRuntime節點改為
<httpRuntime maxRequestLength="502400" targetFramework="4.5" requestValidationMode="2.0" />
原因不清楚。
signalr使用websocket報500錯誤