C
C#3y ago
Hulkstance

❔ Trying to use Azure SignalR Service as Backplane and for client affinity (Sticky sessions)

Pretty self explanatory title. However, I'm getting CORS issue as you can see in the image.
services.AddSignalR().AddAzureSignalR("Endpoint=https://xxx.signalr.net;AccessKey=xxx;Version=1.0;");

...

app.MapHub<NotificationHub>("/notification");
services.AddSignalR().AddAzureSignalR("Endpoint=https://xxx.signalr.net;AccessKey=xxx;Version=1.0;");

...

app.MapHub<NotificationHub>("/notification");
const connection = new HubConnectionBuilder()
.withUrl(`${apiRoutes.root}/${HUB_NAME}`, {
accessTokenFactory: () => authUser.accessToken || ''
})
.configureLogging(LogLevel.Information)
.withAutomaticReconnect()
.build();
const connection = new HubConnectionBuilder()
.withUrl(`${apiRoutes.root}/${HUB_NAME}`, {
accessTokenFactory: () => authUser.accessToken || ''
})
.configureLogging(LogLevel.Information)
.withAutomaticReconnect()
.build();
services.AddCors(o => o.AddPolicy("AllowAll", builder =>
{
builder.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader();
}));
services.AddCors(o => o.AddPolicy("AllowAll", builder =>
{
builder.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader();
}));
4 Replies
Hulkstance
HulkstanceOP3y ago
@TeBeConsulting
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Hulkstance
HulkstanceOP3y ago
thanks once again ❤️
Accord
Accord3y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?