Hello, We've been seeing a lot of SignalR related errors in production environments: one of the most common issues is this request fails with response code 0. POST /signalr-chat/negotiate?enc_auth_token=wNYmO41%2F48SHNstaLVXxHCCre29BZQl1NhC6NM3R3rzpXtPQxVzH6jEzA%2FQhXFN5tu6Fk7pO53uppm1mVXMZgxbyRVz26dnepi%2FFyB6axBY%2B6gq1GL%2BuRQgoiFUCjRN2p8w6LevViwKlHyWZZJZO1DGVSjAi1m2U%2Bog9pkHw9%2FSxl3%2FCN5UQl0zWOAF1kZIOvFlT8rcg3PxdGPwFTMql9snkIL29UFtw7ie5BwWrOOXGeIpwMw7Q582asrU1E8G%2FwLcc7d38xTPFUCgSUVYrlUSdjC1wVJIMfTBdfVKxJVuLz%2FVKNqwGWSkISts00UySZwgoQT4HK4O0E0fnkOAdrcOwsbNP%2FvQuHXKpd7dNX%2FFA7V4MMCVGPzwYmQKsewZopNUtqtRJiyIKrO%2BaooXJ8%2FR6jz77s%2FqATwXK%2BQqcGWBA3LV5uhs%2FLNmPOjMZzARUPNc3ZbsTUPBsMyl2q7FV8cGlE4nw5KPJvtwOYXsMeyjqhdgbSXMntyTlywvrJRcEsS8t3qdbwuQkPVleeydZlKTs6J7BNYZzy8p3NeyeSEEgTQAZjQ%2B5zVnnmhNF3BdGpLsiCT3%2FZ3JdyrTSfFrhnptDPD6Ih3BfC2hTMmMA4OfhAfaTDUDpc88y3cxCn3kaXO%2BgIxuTdjU%2BZayNLFu8cNI5%2BYaQoLpDyavc5lUq7HwRX8p226CvDERJjDMNvyybye6UoZYnz%2BahBr3Uohi3zly000T5r%2B8oAvLxk3Marl5NaBwY0E0Q0N1HjtDn4o18QINsYs5ieyzK6%2FbzzbUu4G3L5V2FgTWNmnOWSPmaYP7BtdoWoItFXlptwpo4MHgmOvIe2f2hX0RKfXATsSfW2SMky1qoEDRpur6fe8ZXWnBkUIIg9LjfdFaVQwq7%2FUz
In the following article Microsoft mentions a way to configure SignalR to use only WebSocket and turn off Negotiation. What is the way to apply this in ASPNet Boilerplate? https://learn.microsoft.com/en-us/aspnet/core/signalr/scale?view=aspnetcore-7.0 Please advise Thanks
6 Answer(s)
-
0
Hi @MellowoodMedical
Do you use Angular or Razor pages for your project ?
-
0
Hi @ismcagdas, We use Angular
-
0
Hi,
Thanks. In that case, you can set
abp.signalr.withUrlOptions
to set options of WithUrl. AspNet Zero uses https://learn.microsoft.com/en-us/javascript/api/@microsoft/signalr/hubconnectionbuilder?view=signalr-js-latest#@microsoft-signalr-hubconnectionbuilder-withurl-2 and you can find its options here https://learn.microsoft.com/en-us/javascript/api/@microsoft/signalr/ihttpconnectionoptions?view=signalr-js-latest -
0
Hi Ismcagdas, Thank you. This will help to configure SignalR on the client side. Is there a way to access SignalR configuration from the server side while initializing a Hub?
-
0
Hi,
For server side, you can modify the line below in your Startup.cs file;
services.AddSignalR();
-
0
Thank you!