Re-enable WebSocket Support in SignalR 3 Beta 8

If you've recently upgraded to the latest ASP.NET 5 Beta 8 Packages, you may have noticed SignalR will no longer use WebSockets and default back to long polling. Due to some changes in how the web server stack is handled, mainly through IIS or IIS Express, you now have to adjust your middleware pipeline to add websocket support.

First, add the following package to your project.json file: "Microsoft.AspNet.WebSockets.Server": "1.0.0-beta8"

Then, in your Startup.cs file, add the following to your Configure block: app.UseWebSockets();. I put it before my app.UseMvc() line.

You should then be able to connect again using WebSockets through SignalR.