ERR_SPDY_PROTOCOL_ERROR Ajax .net web api ERR_SPDY_PROTOCOL_ERROR Ajax .net web api azure azure

ERR_SPDY_PROTOCOL_ERROR Ajax .net web api


The solution for me was that Chrome was being strict on the format for the Authorization header.

The format of the header is scheme token, and its important that you don't include a colon after the scheme. My older style code had the format Bearer: thetoken, which was failing. I changed it to Bearer thetoken and now everything is working correctly.

headers: {    'Authorization': 'Bearer ' + token}


For me the issue was that I was sending an empty Authorization header.

The login to my app (an AngularJS SPA) sends a username/password in a JSON object, and if the login is valid then a JWT is returned which is then used for the Authorization header - e.g. Bearer {JWT} for future API requests.

Not sending an Authorization header when there was nothing to send fixed the issue.


I had this same issue. The fix in my case was updating the Authorization header to not include a JSON object when making the API call. Probably something I shouldn't have done in the first place. ;-)

Example

headers: {    'Authorization': 'Bearer ' + accessToken}