title: SignalR negotiate fails (Bad Gateway)
body: <p>Someone any idea, I’ve been struggling with this for some time.</p>
  
  <p>I'm using SignalR (Asp.net 5). when I try to debug local (ISS 10.0 express) everything is working fine. SignalR is working (Long poll).</p>
  
  <p>Now when I publish the app to Azure it I can access : .azurewebsites.net/signalr/hubs </p>
  
  <p>but I cannot access .azurewebsites.net/signalr/hubs/negotiate
  it returns: 
  The specified CGI application encountered an error and the server terminated the process.</p>
  
  <p>When my web app calls $.connection.hub.start() it will fail. 
  GET XHR <a href="http://xxxx.azurewebsites.net/signalr/negotiate" rel="nofollow">http://xxxx.azurewebsites.net/signalr/negotiate</a> [HTTP/1.1 502 Bad Gateway]</p>
  
  <p>I’m running out of idea's. Don't know how I can get more debug information.</p>
  
  <p>Small selection of my ‘already tried’ list:</p>
  
  <ul>
  <li>Set $.connection.hub.url path manual to <a href="http://xxxx.azurewebsites.net/signalr/" rel="nofollow">http://xxxx.azurewebsites.net/signalr/</a></li>
  <li>Enable/Disable websockets</li>
  <li>Removed forwardWindowsAuthToken from the web.config httpPlatform </li>
  </ul>
  
  <p><strong>EDIT:
  Now getting more details on this error:</strong></p>
  
  <p>CryptographicException: The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating.</p>
  
  <p>Still absolutely no idea how to solve this!</p>