diff --git a/COMCMS.Core/COMCMS.Core.csproj b/COMCMS.Core/COMCMS.Core.csproj
index 9e28b9c..b61a5ca 100644
--- a/COMCMS.Core/COMCMS.Core.csproj
+++ b/COMCMS.Core/COMCMS.Core.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/COMCMS.Web/COMCMS.Web.csproj b/COMCMS.Web/COMCMS.Web.csproj
index a42f220..bc29e6e 100644
--- a/COMCMS.Web/COMCMS.Web.csproj
+++ b/COMCMS.Web/COMCMS.Web.csproj
@@ -8,10 +8,10 @@
-
+
-
-
+
+
diff --git a/COMCMS.Web/Startup.cs b/COMCMS.Web/Startup.cs
index a762b29..e257cee 100644
--- a/COMCMS.Web/Startup.cs
+++ b/COMCMS.Web/Startup.cs
@@ -24,6 +24,7 @@ using Senparc.Weixin;
using Senparc.CO2NET.Cache;
using System.Configuration;
using Microsoft.Extensions.Options;
+using Senparc.Weixin.RegisterServices;
namespace COMCMS.Web
{
@@ -74,6 +75,8 @@ namespace COMCMS.Web
{
options.Filters.Add();
});
+ services.AddSenparcGlobalServices(Configuration)//Senparc.CO2NET 全局注册
+ .AddSenparcWeixinServices(Configuration);//Senparc.Weixin 注册(如果使用Senparc.Weixin SDK则添加)
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -128,8 +131,7 @@ namespace COMCMS.Web
});
app.UseMiddlewareExtension(new ResultExceptionHandler());
- RegisterService.Start(env, senparcSetting.Value)
- .UseSenparcWeixin(senparcWeixinSetting.Value, false/*此处为单独用于微信的调试状态*/, () => GetExContainerCacheStrategies());
+ IRegisterService register = RegisterService.Start(env, senparcSetting.Value).UseSenparcGlobal();
//加入HttpContext
//MyHttpContext.ServiceProvider = svp;
}