Hi,
if i use builder.Services.AddSignalR().AddAzureSignalR with Radzen Security i get an exception in
public async Task GetAuthenticationStateAsync()
{
var uri = new Uri($"{navigationManager.BaseUri}Account/CurrentUser");
var response = await httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Post, uri)); <--
"The HeaderPropagationValues.Headers property has not been initialized. Register the header propagation middleware by adding 'app.UseHeaderPropagation()' in the 'Configure(...)' method. Header propagation can only be used within the context of an HTTP request."
Hi @Chris_Schmiitz,
Do you see the header propagation registration code in the Program.cs file of your app? It should look like this:
builder.Services.AddHttpClient("YourAppRootNamespace")
.AddHeaderPropagation(o => o.Headers.Add("Cookie"));
builder.Services.AddHeaderPropagation(o => o.Headers.Add("Cookie"));
And then a bit later:
app.UseHeaderPropagation();
I wonder if it interferes somehow with AzureSignalR. You can try moving the registration before or after.
Yes the header propagation is in the prgram.cs. It make no diffrence when you call the AddSignalR.
If oyu start a new project with RadzenStudio, insert a MS SQL DB and add Security ASP.NETCore Identy and you insert the AddAzureSignalR you will get the exception.
I am afraid we don't have an active AzureSignalR instance so we can't test that easily. You seem to have found an incompatibility between AzureSignalR and the Microsoft header propagation middleware. I am afraid we can't provide more info at this time. Let me know if this is a deal breaker for you and we will fully refund your purchase.