title: How to enable WebSockets in IIS 8?
body: <p>I deployed the SignalR samples application on a Windows 2012, IIS 8 server.</p>
  
  <p>I installed WebSocket protocol support as described here: <a href="http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support" rel="nofollow">http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support</a></p>
  
  <p>But I still can't connect using WebSockets. Here is the application I deployed: <a href="http://machines-staging.dgplatformer.net/SignalRSamples/Hubs/HubConnectionAPI/" rel="nofollow">http://machines-staging.dgplatformer.net/SignalRSamples/Hubs/HubConnectionAPI/</a></p>
  
  <p>And the message log:</p>
  
  <pre><code>[20:05:12 GMT-0200 (E. South America Daylight Time)]: disconnected =&gt; connecting undefined
  [20:05:12 GMT-0200 (E. South America Daylight Time)]: connecting =&gt; connected 49b8a6d4-41ef-4ff8-8f3d-8e1a513649bb
  [20:05:12 GMT-0200 (E. South America Daylight Time)]: 49b8a6d4-41ef-4ff8-8f3d-8e1a513649bb OnConnected
  started transport: **serverSentEvents** 49b8a6d4-41ef-4ff8-8f3d-8e1a513649bb
  </code></pre>
  
  <p>I found this one deployed on Azure (to compare): <a href="http://signalr-test1.cloudapp.net:82/Hubs/HubConnectionAPI/" rel="nofollow">http://signalr-test1.cloudapp.net:82/Hubs/HubConnectionAPI/</a></p>
  
  <p>Log:</p>
  
  <pre><code>20:11:18 GMT-0200 (E. South America Daylight Time) stateChanged: disconnected =&gt; connecting
  20:11:18 GMT-0200 (E. South America Daylight Time) starting state: connecting
  20:11:19 GMT-0200 (E. South America Daylight Time) stateChanged: connecting =&gt; connected
  20:11:19 GMT-0200 (E. South America Daylight Time) 68b036a9-4e08-49a4-b11c-9ba15718e2d9 OnConnected
  20:11:19 GMT-0200 (E. South America Daylight Time) started transport: **webSockets** 68b036a9-4e08-49a4-b11c-9ba15718e2d9
  </code></pre>
  
  <p>What do I need to do to use WebScokets on our IIS8 server?</p>
  
  <p>This is the IIS log:</p>
  
  <pre><code>Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
  
  2014-01-29 22:14:13 192.168.0.33 GET /SignalRSamples/signalr/connect transport=webSockets&amp;connectionToken=5O27InctUL0WgtbDF6bF8BhVEzndWHHsxlcZV3Ov1Oi3XiReG5eLZmtvSjL3AoqoKAAIStCAIt8uAnPsBhqSe1aL24Uv0cnAv5%2FP%2BgsEseUC%2BOj2if%2Bl9DMsvc%2BkI3N7&amp;connectionData=%5B%7B%22name%22%3A%22hubconnectionapi%22%7D%5D&amp;tid=2 80 - 186.231.71.234 Mozilla/5.0+(Windows+NT+6.2;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/32.0.1700.76+Safari/537.36 - 400 0 0 155
  </code></pre>