Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>That's all true what you said and it actually takes place in my issue.<br/><br/> But I also found the the root cause:<br/> One of main assumptions during design was to allow both anonymous users to use the chat without need to sign-in and the back-end users (agents) to sign-in to restricted area of chat using their Windows credentials.<br/><br/> So on the IIS manager I enabled both Anonymous authentication (allowing anonymous users to use the chat) and the Windows authentication (allowing agents to access using their Windows credentials).<br/> MVC application is configured to use Windows authentication - the <code>[Authorize]</code> attribute mentioned in question, but only to restrict access for agent's view of chat.<br/><br/> What actually happens with above configuration is:<br/> 1. When client (agent) requests restricted View (let's say it's <code>/Chat/Agent</code>) the <code>[Authorize]</code> attribute initializes authentication (Windows)<br/> 2. Client-side Javascript requests <code>Negotiate</code>, what generates <code>connectionId</code> and binds it with client's Windows <code>Identity</code><br/> 3. Here is the tricky part: Because Hub not uses any authentication explicitly, calling <code>send</code> method does not result in any authentication request - IIS Anonymous authentication takes precedency before Windows authentication, and <code>send</code> request is sent with anonymous <code>Identity</code> - but in Hub actual <code>connectionId</code> is related to <code>Identity</code> passed in point 2.<br/><br/> This scenario leads to situation you described - <code>connect</code> is called with different <code>Identity</code> than <code>send</code> and Hub returns <code>The connection id is in the incorrect format.</code><br/><br/></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload