diff --git a/CubeDemo/CubeDemo.csproj b/CubeDemo/CubeDemo.csproj
index c58d03df..8367547f 100644
--- a/CubeDemo/CubeDemo.csproj
+++ b/CubeDemo/CubeDemo.csproj
@@ -24,7 +24,7 @@
-
+
diff --git a/CubeDemoNC/CubeDemoNC.csproj b/CubeDemoNC/CubeDemoNC.csproj
index b998cca9..8ba8c683 100644
--- a/CubeDemoNC/CubeDemoNC.csproj
+++ b/CubeDemoNC/CubeDemoNC.csproj
@@ -42,8 +42,8 @@
-
-
+
+
diff --git a/CubeDemoNC/Startup.cs b/CubeDemoNC/Startup.cs
index 09e5878d..333b760c 100644
--- a/CubeDemoNC/Startup.cs
+++ b/CubeDemoNC/Startup.cs
@@ -33,9 +33,10 @@ public void ConfigureServices(IServiceCollection services)
var config = star.GetConfig();
var cacheConn = config["RedisCache"];
+ Redis redis = null;
if (!cacheConn.IsNullOrEmpty())
{
- var redis = new FullRedis { Log = XTrace.Log, Tracer = star.Tracer };
+ redis = new FullRedis { Log = XTrace.Log, Tracer = star.Tracer };
redis.Init(cacheConn);
services.AddSingleton(redis);
}
@@ -47,9 +48,9 @@ public void ConfigureServices(IServiceCollection services)
services.AddCube();
//services.AddBlazor();
- if (!cacheConn.IsNullOrEmpty())
+ if (redis != null)
{
- services.AddDataProtection().PersistKeysToRedis();
+ services.AddDataProtection().PersistKeysToRedis(redis);
}
}
diff --git a/CubeSSO/CubeSSO.csproj b/CubeSSO/CubeSSO.csproj
index 995eef60..cdf5345b 100644
--- a/CubeSSO/CubeSSO.csproj
+++ b/CubeSSO/CubeSSO.csproj
@@ -24,7 +24,7 @@
-
+
diff --git a/NewLife.Cube/NewLife.Cube.csproj b/NewLife.Cube/NewLife.Cube.csproj
index e52b0700..a7fb1ba3 100644
--- a/NewLife.Cube/NewLife.Cube.csproj
+++ b/NewLife.Cube/NewLife.Cube.csproj
@@ -86,9 +86,9 @@
-
-
-
+
+
+
diff --git a/NewLife.CubeNC/NewLife.CubeNC.csproj b/NewLife.CubeNC/NewLife.CubeNC.csproj
index 94991f65..260c1c51 100644
--- a/NewLife.CubeNC/NewLife.CubeNC.csproj
+++ b/NewLife.CubeNC/NewLife.CubeNC.csproj
@@ -51,8 +51,8 @@
-
-
+
+