I have used Azure SignalR service. It works fine for test project but when i embed in my real project. It throw error (Access Token must not be longer than 4K).
Access Token must not be longer than 4K. 413 Request Entity Too Large
We were using SignalR in our project, now we are shifting to Azure SignalR Service. I have made a Test Project where i used Azure SignalR Service, It was working fine there but i embed that in my real project it throws error (Access Token must not be longer than 4K). I have tried different solution on IIS and in web.config level, increase size of messages kind of things but nothing works. I have check my cookie size its less than 1k. Couldn't get the working of Azure SignalR Service connection making. Why it works in test project. Mean is it include cookies and claims from page that exist on my page in case of real project.
I got this thing but it doesn't work in Asp.net because its core example.
services.AddSignalR()
.AddAzureSignalR(options =>
{
options.ClaimsProvider = context => context.User.Claims;
});
I have tried bindings in web.config but increase size of message doesn't work because its header level thing.
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding" maxReceivedMessageSize="524288000"/>
<binding name="mexHttpBinding" maxReceivedMessageSize="524288000" />
</basicHttpBinding>
</bindings>
For ASP.NET you can use the following to simply pass through a empty claim if your Hub does not have advanced authentication such as role based authentication.
app.MapAzureSignalR(GetType().FullName
, options => options.ClaimsProvider = context => new Claim[] {});