Replies: 1 comment 2 replies
-
For the users that consistently get 404's, do they always succeed with LongPolling? Can you remove auth from the server to verify that it isn't causing any issues? Is there anything unique about the users who 404 compared to the users who are successfully using WebSockets? Like are they on a corporate network, or going through a reverse proxy? Ideally we would like to see server logs and a network trace from the client to diagnose further. https://docs.microsoft.com/aspnet/core/signalr/diagnostics?view=aspnetcore-3.1 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
SignalR gives me 404 when trying to connect for some users. URLs are the same except for access_token.
It is stable reproducible per user (I mean that some users are stable OK, some users are stable 404).
![negotiation result](https://user-images.githubusercontent.com/4789526/95337752-d6771600-08ba-11eb-9c66-c36ad99100ab.png)
Negotiation is fine for all users, and returns next:
access_token parsed jwt diff (left is OK user, right gets 404):
![access_token parsed jwt diff](https://camo.githubusercontent.com/66a0427a5b1a2978d739d553b99149cc150412c3782515ce882fd5378ee6b296/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f79335259432e706e67)
I did a trace level of logs and have next:
![TRACE console.log for OK user](https://camo.githubusercontent.com/8e96f0d6769182f4ce3dba1cbfe456168b0e7d4dced8a321c2d2918f35951878/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f4b554a4c612e706e67)
For the OK user:
For the user that gets 404:
![TRACE console.log for 404 user](https://camo.githubusercontent.com/9dbfeea83f4250d2e6711bb188e7bfb42e7b4ece39703106ff8f370901d43444/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f61737253642e706e67)
Note: URLs under black squares are the same.
Front End is Angular 9 with package
"@microsoft/signalr": "^3.1.8"
, and here's the code that builds the connection:Backend is using next code in Startup for configuring signalR hub:
In
public void ConfigureServices(IServiceCollection services)
:In
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
:Also we use custom authentication, so we have
Authorize
attribute for the Hub class:and this code in
public void ConfigureServices(IServiceCollection services)
:Unfortunately, I don't have the full access to the environment where it is reproducible, but I can request to see any settings or try to make some changes.
What else can I try to troubleshoot my issue?
Beta Was this translation helpful? Give feedback.
All reactions