SignalR LongPolling: The request filtering module is configured to deny a request where the query string is too long

StackOverflow https://stackoverflow.com/questions/21240820

  •  30-09-2022
  •  | 
  •  

Question

I have a problem with SignalR LongPolling. After an issue with the group management in long polling that has been solved (I think) thanks to the workaround @dfowler told me, things stop working eventually because the polling stop working.

The app works well, but after a some time of inactivity, this start to happen:

HTTP Error 404.15 - Not Found The request filtering module is configured to deny a request where the query string is too long.

I can see that the URL is in fact very long:

https://localhost/MyTestWeb1.PriceIsRight.Web/updates/poll?transport=longPolling&connectionToken=Wi8JkSIcjGdvYVBxzJ3CZclkwYL7d2peZzobOJABzsPzirhKHgTI2K%2BQh%2FNbfGv3L3iGoIhp8HxbZnptzuynccLQq9dbaHIHy0OlshLGHf%2Be%2BxPxV%2F3NoP1XNRVLtSJs&groupsToken=%2F6rKIYLag7J94szTAkdB2z9201%2BQ3eK5y9HjYwSBmTAp77FO6%2FYf5TcnzcYX2mieQ%2FN16z7A9FL8jn%2Bhbz8K5q%2BAjKE5z%2BqixE6oGO9JcsJcOzWYSDMG25Y96Bw6AyoRFEfBjWC0k1xsaTIVArKoWvw8rvqua7R8bPX3UQcvhGxa1ODABLtPch2NW5QGWbRnomPnqJwm9cO9elfQeh5Yt9Toneu8f4JFSXcub0uH78RgGIoc0bIABsAIPJa5lBOrIwAFe8LZKKx7FWRPzssql6GBN9VJ7KZW4sEEpPS4OpIMgcLlZ4UbpfOLbb%2F%2BBRlIvGRIS4PXRQufozELnh7E3JkWNH7tCJy2fcuc8nOKA3w1cyQU9RVlOf7Y6zyY4GNuuIbkEmq8SN9xfrF%2B0oTQ5FY%2Fq%2BdqPdm2heVBY6pH0liKwMjRo%2BTEtiU9zzTjXFsXhCdnGjdNeVzONKIpXN1q1Xhu%2FS7JLVYOZN2ITbD9BUIH3q%2FRPgKkevZSpInUXa1CDueNlR1iWJYP7wJKY%2FfheR%2BORzwu%2BmK1RwgGTZkG8rnT%2F1jIeu23SBBURajqcXPgw6BQJuAL9q8JQx8ZTKA3odt3ja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R30oNl9TB1hIm7q6qVskCwCaPSN5m04Thj2MAIzHGuG18zbHxB6lqBwbXM9FyKmFeAiVNPhY3WTvC5wPEatIMzXBNJ4S6m5rUppcoQLFseBVPRYB%2BfMRqDaU%2FRbWdWxlPHsGkQxVq&messageId=d-B836F05A-B%2C52%7Cb%2CC%7Cc%2C0%7Cf%2C3A%7Cg%2C38%7Ch%2C32%7Ci%2C36%7Cj%2C36%7Ck%2C38%7Cl%2C38%7Cm%2C3E%7Cn%2C34%7Co%2C3E%7Cp%2C0&param=true&tid=10&_=1390238814537

The reconnection also fails, and then it disconnects:

[17:38:08 GMT+0000 (GMT Standard Time)] SignalR: Couldn't reconnect within the configured timeout (30000ms), disconnecting. jquery.signalR-2.0.1.js:77
[17:38:08 GMT+0000 (GMT Standard Time)] SignalR: Stopping connection. 

If I refresh the page, all start to work well again. Then when I check a the poll request, the URL looks much shorter:

https://localhost/MyTestWeb1.PriceIsRight.Web/updates/poll?transport=longPolling&connectionToken=z4yGjBDaK8hh9eOfWPxXy4%2BpkC%2BDTCtZjlsi%2BDM0Z3JJofNE0E7BX%2B2QtIn0n0mzCsXyk0Tna3%2FCYRaKoSliA6uFNraONdleoKJgoq1chUZSRf5qHs5RazfXrQFw6ifQ&groupsToken=z8QTCuB6CWlSFs76g62l5odbEtSW3Rv1a46podyAeNBRjlIrCDNcgEDoRhPpiOE1aRoOiy7x%2B3wFicWhHhK4FCTKKk8We%2BzIvnERITIhstdJ3e5yOt8veR2aWcLhyOsPf8i5zoeRLwrizj0QZlplP1GgmbjO9wFJG4ySe2TKddGRFfFE4Qfy%2F03OBD4sL8mOC8kBMAWNE6oTvaJiJJ3QMKvtUBjFeg%2BorNvl26EwaG5zE5laJZkwTha7BHHnysOPvxFXFKE6yVoad9zifiHQDj%2Fp8TYQ3DbSFKsaSynyEYlU4YCg4TzgyrXGvhUPGZ4EYlTwBa7RoPsqOwspeIziDEBk4OW9sb8LtTdOXJXTVZXFoZ34XOdgqcZVHHCJvESczZE5AmsLoCts4Xq58ld6f9PDHdxmtTUkAEj0CcS9Bqg%3D&messageId=d-B836F05A-q%2CA%7Cr%2C3%7Cs%2C0%7Cv%2C45%7Cw%2C9&param=true&tid=0&_=1390239846281

Is there any reason why the URL could grow that way?

Thanks.

PS: There is a formatting issue in this post. I don't know where =1390238814537"> and =1390239846281"> at the beginning of the pasted URLs are coming from.

Was it helpful?

Solution

As @halter73 pointed out, the problem are the groups.

This is being caused by the groupsToken which expands as you add the client to more groups.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top