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
解决方法如下:
服务端webconfig的httpRuntime节点改为
<httpRuntime maxRequestLength="502400" targetFramework="4.5" requestValidationMode="2.0" />
原因不清楚。
转载于:https://blog.51cto.com/5591787/2131458