diff --git a/Samples/BlazorExample/BlazorExample/BlazorExample.Client/BlazorExample.Client.csproj b/Samples/BlazorExample/BlazorExample/BlazorExample.Client/BlazorExample.Client.csproj
index 476ea336f7..473fa00bda 100644
--- a/Samples/BlazorExample/BlazorExample/BlazorExample.Client/BlazorExample.Client.csproj
+++ b/Samples/BlazorExample/BlazorExample/BlazorExample.Client/BlazorExample.Client.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Program.cs b/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Program.cs
index 43c2b52bbc..32733b2215 100644
--- a/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Program.cs
+++ b/Samples/BlazorExample/BlazorExample/BlazorExample.Client/Program.cs
@@ -10,7 +10,7 @@
builder.Services.AddCsla(o => o
.AddBlazorWebAssembly(o => o.SyncContextWithServer = true)
- .Security(o => o.FlowSecurityPrincipalFromClient = true)
+ .Security(o => o.FlowSecurityPrincipalFromClient = false)
.DataPortal(o => o.ClientSideDataPortal(o => o
.UseHttpProxy(o => o.DataPortalUrl = "/api/DataPortal"))));
diff --git a/Samples/BlazorExample/BlazorExample/BlazorExample/BlazorExample.csproj b/Samples/BlazorExample/BlazorExample/BlazorExample/BlazorExample.csproj
index a0461e9759..7605af5a94 100644
--- a/Samples/BlazorExample/BlazorExample/BlazorExample/BlazorExample.csproj
+++ b/Samples/BlazorExample/BlazorExample/BlazorExample/BlazorExample.csproj
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/Samples/BlazorExample/BlazorExample/BlazorExample/Program.cs b/Samples/BlazorExample/BlazorExample/BlazorExample/Program.cs
index 98af6f1a6f..c1578ec223 100644
--- a/Samples/BlazorExample/BlazorExample/BlazorExample/Program.cs
+++ b/Samples/BlazorExample/BlazorExample/BlazorExample/Program.cs
@@ -20,7 +20,7 @@
builder.Services.AddCsla(o => o
.AddAspNetCore()
.AddServerSideBlazor(o => o.UseInMemoryApplicationContextManager = false)
- .Security(so => so.FlowSecurityPrincipalFromClient = true)
+ .Security(so => so.FlowSecurityPrincipalFromClient = false)
.DataPortal(dpo => dpo
.AddServerSideDataPortal()
.ClientSideDataPortal(co => co
diff --git a/Samples/BlazorExample/BlazorExample/BusinessLibrary/BusinessLibrary.csproj b/Samples/BlazorExample/BlazorExample/BusinessLibrary/BusinessLibrary.csproj
index 31d51d11d0..c34e4b3dc3 100644
--- a/Samples/BlazorExample/BlazorExample/BusinessLibrary/BusinessLibrary.csproj
+++ b/Samples/BlazorExample/BlazorExample/BusinessLibrary/BusinessLibrary.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/Samples/BlazorExample/BlazorExample/DataAccess.EF/DataAccess.EF.csproj b/Samples/BlazorExample/BlazorExample/DataAccess.EF/DataAccess.EF.csproj
index cdcb7a5f97..37a4825c31 100644
--- a/Samples/BlazorExample/BlazorExample/DataAccess.EF/DataAccess.EF.csproj
+++ b/Samples/BlazorExample/BlazorExample/DataAccess.EF/DataAccess.EF.csproj
@@ -5,7 +5,7 @@
-
+
all
diff --git a/Samples/BlazorExample/BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj b/Samples/BlazorExample/BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj
index c688fe3709..a8b8e8ef93 100644
--- a/Samples/BlazorExample/BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj
+++ b/Samples/BlazorExample/BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/Samples/BlazorExample/BlazorExample/DataAccess/DataAccess.csproj b/Samples/BlazorExample/BlazorExample/DataAccess/DataAccess.csproj
index 63756d2c53..6e0ef17f4b 100644
--- a/Samples/BlazorExample/BlazorExample/DataAccess/DataAccess.csproj
+++ b/Samples/BlazorExample/BlazorExample/DataAccess/DataAccess.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/Source/Csla.Blazor.WebAssembly/Configuration/ConfigurationExtensions.cs b/Source/Csla.Blazor.WebAssembly/Configuration/ConfigurationExtensions.cs
index a9525eeb85..41237321a3 100644
--- a/Source/Csla.Blazor.WebAssembly/Configuration/ConfigurationExtensions.cs
+++ b/Source/Csla.Blazor.WebAssembly/Configuration/ConfigurationExtensions.cs
@@ -10,7 +10,6 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.DependencyInjection.Extensions;
using Csla.Blazor.WebAssembly.Configuration;
namespace Csla.Configuration
@@ -40,11 +39,11 @@ public static CslaOptions AddBlazorWebAssembly(this CslaOptions config, Action blazorOptions);
- config.Services.TryAddTransient(typeof(ViewModel<>), typeof(ViewModel<>));
- config.Services.TryAddScoped();
- config.Services.TryAddScoped();
- config.Services.TryAddScoped(typeof(Csla.Core.IContextManager), typeof(Csla.Blazor.WebAssembly.ApplicationContextManager));
- config.Services.TryAddScoped(typeof(AuthenticationStateProvider), typeof(Csla.Blazor.Authentication.CslaAuthenticationStateProvider));
+ config.Services.AddTransient(typeof(ViewModel<>), typeof(ViewModel<>));
+ config.Services.AddScoped();
+ config.Services.AddScoped();
+ config.Services.AddScoped(typeof(Csla.Core.IContextManager), typeof(Csla.Blazor.WebAssembly.ApplicationContextManager));
+ config.Services.AddScoped(typeof(AuthenticationStateProvider), typeof(Csla.Blazor.Authentication.CslaAuthenticationStateProvider));
// use Blazor state management
config.Services.AddScoped(typeof(ISessionManager), blazorOptions.SessionManagerType);
diff --git a/Source/Csla/Configuration/ConfigurationExtensions.cs b/Source/Csla/Configuration/ConfigurationExtensions.cs
index e46876f13a..786395c766 100644
--- a/Source/Csla/Configuration/ConfigurationExtensions.cs
+++ b/Source/Csla/Configuration/ConfigurationExtensions.cs
@@ -6,6 +6,7 @@
//
// Implement extension methods for base .NET configuration
//-----------------------------------------------------------------------
+using Csla.Core;
using Csla.DataPortalClient;
using Csla.Runtime;
using Microsoft.Extensions.DependencyInjection;
@@ -70,7 +71,7 @@ private static void RegisterContextManager(IServiceCollection services, Type con
services.AddScoped();
services.TryAddScoped(typeof(Core.IContextManagerLocal), typeof(Core.ApplicationContextManagerAsyncLocal));
- var managerInit = services.Any(i => i.ServiceType.Equals(contextManagerType));
+ var managerInit = services.Count(static i => i.ServiceType.Equals(typeof(IContextManager))) > 0;
if (managerInit) return;
if (contextManagerType != null)
diff --git a/releasenotes.md b/releasenotes.md
index 095364eb40..7a868255ed 100644
--- a/releasenotes.md
+++ b/releasenotes.md
@@ -4,7 +4,16 @@ CSLA 8 is a substantial update to CSLA .NET, adding support for .NET 8 and other
## CSLA .NET version 8.2.5 release
-Updates NuGet package to include latest code changes.
+* [#4075](https://github.com/MarimerLLC/csla/issues/4075) Fix configuration issue with Blazor DI services
+
+### Change List
+
+* https://github.com/MarimerLLC/csla/compare/v8.2.4...v8.2.5
+
+### Contributors
+
+* @jmpotvin
+* @rockfordlhotka
## CSLA .NET version 8.2.4 release