Answered by:
Intermittent SignalR 404s

Question
-
User1486521414 posted
I'm having problems with calls to /signalr/start returning a 404 response intermittently. I will get this about 5 out of every 10 page loads when using Chrome. I do not see the issue in IE11 or Edge.
I noticed initially that serverSentEvents was being used, even though that was not the primary transport option. As a result, I enabled web sockets on IIS, and now I will also sometimes see 404s when calling /signalr/connect intermittently from Chrome.
I am running SignalR version 2.4.1, which I understand is the most recent version. I'm running Chrome 86.0.4240.193. The IIS version is 10.
I read a StackOverflow article that mentioned allowing for very long URLs via the web.config. I tried that and it did not help.
Does anyone have any additional troubleshooting recommendations?
Monday, November 16, 2020 9:05 PM
Answers
-
User1486521414 posted
I discovered the solution. Our site was supposed to be using windows authentication at the top level, but had both anonymous and windows authentication enabled. I disabled anonymous authentication at the top level and the issue went away.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, November 18, 2020 4:27 PM
All replies
-
User475983607 posted
What is the URL that causes the 404? Typically SignalR is single page application. Are you doing an HTTP get to another page?
Monday, November 16, 2020 9:43 PM -
User1486521414 posted
When I load my web page, it initiates a get to https://www.mydomain.com/signalr/start?transport=serverSentEvents... This is where I see intermittent 404s in Chrome. I don't believe this would be considered a get to another page, but I also admit that I am a SignalR novice.
Tuesday, November 17, 2020 12:58 PM -
User1486521414 posted
I discovered the solution. Our site was supposed to be using windows authentication at the top level, but had both anonymous and windows authentication enabled. I disabled anonymous authentication at the top level and the issue went away.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, November 18, 2020 4:27 PM