title: An unexpected behavior of Authorize attribute in SignalR hub, Windows Authentication
body: <p>I'm having a very strange problem with SignalR and I do not know what to do with it.</p>
  
  <p>I made a simple SignalR application from tutorial (<a href="http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/tutorial-getting-started-with-signalr-20" rel="nofollow">http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/tutorial-getting-started-with-signalr-20</a>) in VB.NET, the only thing I changed was that I added <code>&lt;Authorize()&gt;</code> attribute to the Hub class, and made the Send message method grab user name from context. </p>
  
  <p>We have development server (Windows Server 2008 R2, IIS7, .NET 4.5.1.).
  In the development server, in IIS and application settings I enabled Windows Authentication and ASP.NET impersonation. The application works just as expected.</p>
  
  <p>Now, when I deploy this simple application to our production server, the application simply does not work. OS and .NET versions are the same, and I asked our admins to configure IIS and application settings in exactly the same way as in development.
  When I open index.html in Chrome, I see ERR_INVALID_AUTH_CREDENTIALS in JS console, and FF Firebug gives 401 Unauthorized error. Of course, the hub methods do not work.</p>
  
  <p>If I remove <code>&lt;Authorize()&gt;</code> attribute from Hub and recompile the application, it works in both dev and prod, but in this case user name is empty in the Context. So, the problem is definitely somewhere in the Authorization or authentication.</p>
  
  <p>we have some other application in production server which are using Windows Authentication as well, but we never had any problem with them.</p>
  
  <p>Which settings of the server/IIS may cause such a problem?</p>