Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERR_SPDY_PROTOCOL_ERROR Ajax .net web api

Running into a very strange error when trying to execute Ajax calls to a .NET Web Api hosted on IIS on Azure.

I've got my SSL cert from let's encrypt, it's applied to the website properly. When I try to execute an ajax call I get:

net::ERR_SPDY_PROTOCOL_ERROR

If Fiddler is open, all works properly. With Fiddler closed, we get the error. Regular old HTTP works just fine.

like image 449
David McSpadden Avatar asked Aug 02 '17 18:08

David McSpadden


1 Answers

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.

like image 98
Craig Shearer Avatar answered Oct 07 '22 13:10

Craig Shearer