Giter Site home page Giter Site logo

dotnetcore / agileconfig Goto Github PK

View Code? Open in Web Editor NEW
1.4K 25.0 293.0 10.51 MB

基于.NET Core开发的轻量级分布式配置中心 / .NET Core lightweight configuration server

License: MIT License

C# 71.07% JavaScript 0.26% Dockerfile 0.17% TypeScript 26.04% Less 0.98% EJS 0.42% HTML 0.84% CSS 0.23%
agileconfig websocket dotnet-core configuration-server configuration-management configuration-center configuration microservice

agileconfig's People

Contributors

botao-xu avatar dependabot[bot] avatar haoqiancheng avatar harris2012 avatar incerrygit avatar jack397419 avatar kami-poi avatar kklldog avatar lungchito avatar pengqian089 avatar responsibleboy avatar sampsonye avatar tomyangok avatar wlclass avatar wwwu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agileconfig's Issues

Does the server support asp.net core 2.2

hello ,Thank you for developing this framework,I want to deploy this software on Windows server 2008 r2, but 08R2 only supports net core 2.2. A lot of net core 3.1 is referenced in the software. Can you provide a version that supports net core 2.2 ?

继承应用后相应配置的keyvalue没有继承过去

相似项目应用配置大致一样(共同的配置内容)
虽然,在新建应用时,可以选择继承应用,但发现相应配置并没有继承
image

,建议再提供导出现有应用json配置功能,让配置人员到另外一个应用中可以导入该配置;

关于配置项相关的疑问

image

目前是值支持键值对这种形式吗? 比如我想在客户端里读出一个配置节点的对象,应该怎么操作呢?

关于发布的问题

我自己下载了源代码后,修改完appsetting的数据库配置后,使用AgileConfig.Server.Apisite能启动项目,但是想发布到本地使用发现发布的程序无法启动。请问这个项目想本地发布该怎么操作

docker 环境错误

错误信息:

When ::ffff:221.237.187.12 request /admin/InitPassword error , but not handled .
 The type initializer for 'AgileConfig.Server.Data.Freesql.FreeSQL' threw an exception. 
    at AgileConfig.Server.Data.Freesql.FreeSQL.get_Instance() in /src/AgileConfig.Server.Data.Freesql/FreeSQL.cs:line 20
   at AgileConfig.Server.Data.Freesql.ServiceCollectionExt.<>c.<AddFreeSqlDbContext>b__0_0(DbContextOptionsBuilder options) in /src/AgileConfig.Server.Data.Freesql/ServiceCollectionExt.cs:line 12
   at Microsoft.Extensions.DependencyInjection.FreeSqlDbContextDependencyInjection.<>c__DisplayClass0_0.<AddFreeDbContext>b__0(IServiceProvider sp)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.GetService(IServiceProvider sp, Type type, Type middleware)
   at lambda_method(Closure , Object , HttpContext , IServiceProvider )
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass4_1.<UseMiddleware>b__2(HttpContext context)
   at Microsoft.AspNetCore.WebSockets.WebSocketMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.EvaluateAndApplyPolicy(HttpContext context, CorsPolicy corsPolicy)
   at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context, ICorsPolicyProvider corsPolicyProvider)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass4_1.<UseMiddleware>b__2(HttpContext context)
   at AgileConfig.Server.Apisite.UIExtension.ReactUIMiddleware.Invoke(HttpContext context) in /src/AgileConfig.Server.Apisite/UIExtension/ReactUIMiddleware.cs:line 127
   at AgileConfig.Server.Common.ExceptionHandlerMiddleware.Invoke(HttpContext context) in /src/AgileConfig.Server.Common/ExceptionHandlerMiddleware.cs:line 27
url: http://*/admin/InitPassword action: 
The type initializer for 'AgileConfig.Server.Data.Freesql.FreeSQL' threw an exception.

这是什么错误,连不上数据库?使用sqlite也不行

Can not start docker when passwod contains special char

System
Centos7
Docker Cmd

docker run -d \
-e adminConsole=true \
-e db:provider=sqlserver \
-e db:conn="Data Source=****;Initial Catalog=****;User ID=****;Password=!@#$%^789" \
-p 8235:5000 \
-v /etc/localtime:/etc/localtime  \
kklldog/agile_config:latest

Error

【主库】恢复检查时间:08/11/2021 10:51:47
Unhandled exception. System.TypeInitializationException: The type initializer for 'AgileConfig.Server.Data.Freesql.FreeSQL' threw an exception.
 ---> System.Exception: 【主库】状态不可用,等待后台检查程序恢复方可使用。A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
 ---> System.Exception: 【主库】状态不可用,等待后台检查程序恢复方可使用。A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
   at FreeSql.Internal.ObjectPool.ObjectPool`1.getFree(Boolean checkAvailable)
   at FreeSql.Internal.ObjectPool.ObjectPool`1.Get(Nullable`1 timeout)
   at FreeSql.Internal.CommonProvider.AdoProvider.ExecuteScalar(DbConnection connection, DbTransaction transaction, CommandType cmdType, String cmdText, DbParameter[] cmdParms)
   --- End of inner exception stack trace ---
   at FreeSql.Internal.CommonProvider.AdoProvider.LoggerException(IObjectPool`1 pool, PrepareCommandResult pc, Exception ex, DateTime dt, StringBuilder logtxt, Boolean isThrowException)
   at FreeSql.Internal.CommonProvider.AdoProvider.ExecuteScalar(DbConnection connection, DbTransaction transaction, CommandType cmdType, String cmdText, DbParameter[] cmdParms)
   at FreeSql.Internal.CommonProvider.AdoProvider.ExecuteScalar(String cmdText, Object parms)
   at AgileConfig.Server.Data.Freesql.EnsureTables.ExistTable(IFreeSql instance) in /src/AgileConfig.Server.Data.Freesql/EnsureTables.cs:line 44
   at AgileConfig.Server.Data.Freesql.EnsureTables.Ensure(IFreeSql instance) in /src/AgileConfig.Server.Data.Freesql/EnsureTables.cs:line 55
   at AgileConfig.Server.Data.Freesql.FreeSQL..cctor() in /src/AgileConfig.Server.Data.Freesql/FreeSQL.cs:line 18
   --- End of inner exception stack trace ---
   at AgileConfig.Server.Data.Freesql.FreeSQL.get_Instance() in /src/AgileConfig.Server.Data.Freesql/FreeSQL.cs:line 20
   at AgileConfig.Server.Service.RemoteServerNodeProxy.GetGerverNodeService() in /src/AgileConfig.Server.Service/RemoteServerNodeProxy.cs:line 38
   at AgileConfig.Server.Service.RemoteServerNodeProxy.TestEchoAsync() in /src/AgileConfig.Server.Service/RemoteServerNodeProxy.cs:line 242
   at AgileConfig.Server.Apisite.Program.Main(String[] args) in /src/AgileConfig.Server.Apisite/Program.cs:line 36

Even I use double or single quotes to handle password , it also doesn't work.
Please have a check.

界面调整小建议

1、从关联应用继承的配置项显示出来
2、配置项按分组显示
对于配置项比较多的项目还是很有用的,方便管理配置项

建议环境变量参数不要用冒号等特殊字符

在一些K8S管理工具下,特殊字符不被支持
Validation failed in API: Deployment.apps "agile-config" is invalid: [spec.template.spec.containers[0].env[2].name: Invalid value: "db:conn": a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit (e.g. 'my.env-name', or 'MY_ENV.NAME', or 'MyEnvName1', regex used for validation is '[-._a-zA-Z][-.a-zA-Z0-9]*'), spec.template.spec.containers[0].env[3].name: Invalid value: "db:provider": a valid environment variable name must consist of alphabetic characters, digits, '', '-', or '.', and must not start with a digit (e.g. 'my.env-name', or 'MY_ENV.NAME', or 'MyEnvName1', regex used for validation is '[-._a-zA-Z][-._a-zA-Z0-9]*')]

[BUG] release-1.4.2 角色权限问题

版本: 1.4.2
数据库: sqlite
现象: 用新建的账号发布配置变更,提示发布失败,并跳转至登陆界面
复现步骤:
点击【用户】菜单,【添加】用户按钮,输入用户名称与密码,选择角色为“管理员”
点击【应用】菜单,选择【配置】按钮,赋予新建用户为管理员
点击【应用】菜单,选择【授权】按钮,赋予新建用户,修改权,发布权
再次选择【授权】按钮,确认已授权
退出,使用新用户登录
修改配置功能正常
发布配置功能异常,提示发布失败,并跳转至登陆界面

缓存文件怎么配置路径

程序运行后,会在根目录生成“xxx.agileconfig.client.configs.cache”这样的缓存文件,这个文件的路径有办法配置吗?因为一方面生成在根目录,如果缓存文件多的话,看起来就很乱了,这个存储在特定的文件夹,比如根目录的cache文件夹,方便统一管理;还有就是如果是docker部署的,重新启动容器后,.cache文件就全都丢失了。

镜像文件过大(1.59GB),建议采用如下方式构建以缩减镜像大小,修改后为281MB

修改方式:

  1. 修改Dockerfile内容如下,并将Dockerfile移动到AgileConfig.Server.Apisite项目下,并修改该文件的属性“Copy to output Directory”为“Copy always”.
    FROM mcr.microsoft.com/dotnet/aspnet:3.1-buster-slim AS base
    WORKDIR /app
    EXPOSE 5000
    COPY . /app
    ENTRYPOINT ["dotnet", "AgileConfig.Server.Apisite.dll"]
  2. 发布项目AgileConfig.Server.Apisite,发布目录如“\AgileConfigmaster\AgileConfig.Server.Apisite\bin\Release\netcoreapp3.1\publish”
  3. 切换到发布目录,执行构建命令"docker build -t agile_config ."

修改前镜像大小:
image
修改后镜像大小:
image

使用PostgreSql数据库报错

尝试将AgileConfig部署在docker desktop中连接宿主机上的PostgreSql数据库,在进行一些编辑操作时,会产生异常,容器停止工作。

部署命令:

docker run --restart=always -e adminConsole=true -e db:provider=npgsql -e db:conn="Host=gateway.docker.internal;Port=5432;Username=user;Password=123456;Database=config" -p 5009:5000 -v /etc/localtime:/etc/localtime --name agile_config kklldog/agile_config:latest

大概有两种类型的报错:

  • System.InvalidOperationException: A transaction is already in progress; nested/concurrent transactions aren't supported.
  • Npgsql.NpgsqlOperationInProgressException: The connection is already in state 'Executing'

以下是其中一种的log输出:

warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
No XML encryptor configured. Key {d63c1e47-8e71-4f4e-8faa-b99b82db5293} may be persisted to storage in unencrypted form.
warn: Microsoft.AspNetCore.Server.Kestrel[0]
Overriding address(es) 'http://+:80'. Binding to endpoints defined in UseKestrel() instead.
Hosting environment: Production
Content root path: /app
Now listening on: http://[::]:5000
Application started. Press Ctrl+C to shut down.
info: AgileConfig.Server.Apisite.Websocket.WebsocketHandlerMiddleware[0]
Websocket client 7b7faabb-a438-40d2-be50-991561870bac Added
info: AgileConfig.Server.Apisite.Controllers.RemoteServerProxyController[0]
Request remote node http://gateway.docker.internal:5009 's action OneClientDoAction success .
info: AgileConfig.Server.Apisite.Controllers.RemoteServerProxyController[0]
Request remote node http://gateway.docker.internal:5009 's action AllClientsDoAction success .
info: AgileConfig.Server.Apisite.Controllers.RemoteServerProxyController[0]
Request remote node http://gateway.docker.internal:5009 's action OneClientDoAction success .
fail: AgileConfig.Server.Common.TinyEventBus[0]
fire event OFFLINE_CONFIG_SUCCESS error
Npgsql.NpgsqlOperationInProgressException: The connection is already in state 'Executing'
at FreeSql.UnitOfWork.Rollback()
at FreeSql.UnitOfWork.Dispose()
at FreeSql.DbContext.Dispose()
at AgileConfig.Server.Service.SysLogService.Dispose() in /src/AgileConfig.Server.Service/SysLogService.cs:line 64
at AgileConfig.Server.Service.EventRegister.b__9_11(Object param) in /src/AgileConfig.Server.Service/EventRegister.cs:line 470
at AgileConfig.Server.Common.TinyEventBus.<>c__DisplayClass6_1.b__0() in /src/AgileConfig.Server.Common/TinyEventBus.cs:line 101
fail: AgileConfig.Server.Common.TinyEventBus[0]
fire event PUBLISH_CONFIG_SUCCESS error
Npgsql.NpgsqlOperationInProgressException: A command is already in progress: INSERT INTO "agc_sys_log"("app_id", "log_type", "log_time", "log_text") VALUES(@AppId_0, @LogType_0, @LogTime_0, @LogText_0) RETURNING "id"
at FreeSql.UnitOfWork.Rollback()
at FreeSql.UnitOfWork.Dispose()
at FreeSql.DbContext.Dispose()
at AgileConfig.Server.Service.SysLogService.Dispose() in /src/AgileConfig.Server.Service/SysLogService.cs:line 64
at AgileConfig.Server.Service.EventRegister.b__9_12(Object param) in /src/AgileConfig.Server.Service/EventRegister.cs:line 494
at AgileConfig.Server.Common.TinyEventBus.<>c__DisplayClass6_1.b__0() in /src/AgileConfig.Server.Common/TinyEventBus.cs:line 101
Unhandled exception. System.InvalidOperationException: A transaction is already in progress; nested/concurrent transactions aren't supported.
at FreeSql.UnitOfWork.GetOrBeginTransaction(Boolean isCreate)
at FreeSql.DbSet1.OrmInsert() at FreeSql.DbSet1.OrmInsert(TEntity data)
at FreeSql.DbSet1.AddPrivAsync(TEntity data, Boolean isCheck) at AgileConfig.Server.Service.SysLogService.AddSysLogAsync(SysLog log) in /src/AgileConfig.Server.Service/SysLogService.cs:line 32 at AgileConfig.Server.Service.RemoteServerNodeProxy.AppClientsDoActionAsync(String address, String appId, WebsocketAction action) in /src/AgileConfig.Server.Service/RemoteServerNodeProxy.cs:line 113 at AgileConfig.Server.Service.EventRegister.<RegisterWebsocketAction>b__8_3(Object param) in /src/AgileConfig.Server.Service/EventRegister.cs:line 176 at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state) at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi) at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action1 callback, TState& state)
at System.Threading.QueueUserWorkItemCallback.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

登录界面显示不了,是缺少文件么?

appsettings.Development.json
"adminConsole": true,
"preview_mode": false,
"db": {
"provider": "sqlite", //sqlite,mysql,sqlserver,npgsql,oracle
"conn": "Data Source=agile_config.db"

数据库表:
user表
1 admin 123456 2021-02-01 2021-02-01 0
super_admin super_admin 123456 2021-02-01 2021-05-01 0

建议添加环境配置和多重继承的支持

建议添加环境配置和多重继承的支持

1. 环境配置

当前没有环境的概念,支持环境的配置后可以很方便地在不同的部署环境下切换配置;
可分开发环境、测试环境和生产环境,类似于 appsettings.json,appsettings.Development.json的关系。

2. 多重继承

当前只有两个层级,支持多重继承可以提高配置的复用。
子配置可以继承父配置,孙子配置可以继承子配置等,没有继承层级的限制,或者最多能支持到3~5层配置。

注册配置项修改事件永远未触发

引入AgileConfig代码是这样的

 host.ConfigureAppConfiguration((context, config) =>
            {
              
                //new一个client实例,无参构造会从本地appsettings.json文件读取配置
                var configClient = new ConfigClient($"appsettings.{context.HostingEnvironment.EnvironmentName}.json");
                //使用AddAgileConfig配置一个新的IConfigurationSource
                config.AddAgileConfig(configClient);
                //注册配置项修改事件
                configClient.ConfigChanged += ConfigClient_ConfigChanged; 
            });


        private static void ConfigClient_ConfigChanged(ConfigChangedArg obj)
        {
            Console.WriteLine($"配置项更改!更改信息={obj.Serialize2Json()}");
        }

经观察修改正在运行的配置项后,ConfigClient_ConfigChanged没有被触发

你这开源也太潦草了把

1.关于项目结构希望还是能够描述清楚
2.关于前后端分离,建议两个项目,一个前端一个后端.
3.关于发行版本,可以直接编译出来
4.前后端具体的编译也可以稍微介绍下.

PostgreSql的连接串怎么写?

一直提示
【主库】状态不可用,等待后台检查程序恢复方可使用。连接字符串错误
貌似 Data Source=10.2.27.212;Port=5432;User ID=postgre;Password=postgre;Database=AgileConfig;

这种写法不行...

数据库未生成

大佬,我是下载publish分支源码进行编译使用的,配置的数据库连接,好像没有生成对应的表,不知道是不是我操作姿势不对
1631869787052_D844AAF0-C8A2-4b80-A858-84D5D851D304

关于支持多数据库的建议

叶老板开发的ORM FreeSql支持数据库非常多,如果需要支持多数据库可能用这个来实现比较方便。不知道该项目更换ORM的难度,只是提个建议。感谢作者开发这么好用的工具~

使用过程的小建议

  1. 客户端,搜索条件多加下【IP,客户端名称,应用ID】
  2. 批量刷新配置的维度【应用,IP】
  3. 强制断开之后,添加重连功能?

appsettings.json中的Urls配置不生效

把appsettings.json中的配置导入到AgileConfig中,里面的Urls配置项不起作用,相同的配置在Apollo中是ok的,麻烦作者给看看到底是啥原因?

配置加密问题

虽然找了历史记录你说可以 自己加密 , 但这个需求还是一个比较通用的, 建议 增加这么一个配置, 起码不能明文被抓包到吧。。

k8s中pod环境变量问题

报错提示只允许字母数字和一些字符串 作者能不能改一下最新版本镜像的环境变量名
报错信息
Deployment.apps "agile-v1" is invalid: [spec.template.spec.containers[0].env[1].name: Invalid value: "db:provide": a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit (e.g. 'my.env-name', or 'MY_ENV.NAME', or 'MyEnvName1', regex used for validation is '[-._a-zA-Z][-._a-zA-Z0-9]*'), spec.template.spec.containers[0].env[2].name: Invalid value: "db:conn": a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit (e.g. 'my.env-name', or 'MY_ENV.NAME', or 'MyEnvName1', regex used for validation is '[-._a-zA-Z][-._a-zA-Z0-9]*')]

1.4.2版本 IIS下部署 页面加载时部分静态资源404

您好:

版本:1.4.2

前提

IIS部署主程序后,AgileConfig.Server.UI 下 npm run build 后部署到 wwwroot 目录下,重启站点

现象:

输入 http://localhost:5000/ 出现404 提示“No webpage was found for the web address: http://localhost:5000/ui”
输入 http://localhost:5000/index.html 出现等待界面,仔细查看后,发现有部分资源无法加载
image

切换至 AgileConfig.Server.Apisite.exe 直接启动

输入 http://localhost:5000/ 出现404 提示“No webpage was found for the web address: http://localhost:5000/ui”
输入 http://localhost:5000/index.html 正常使用

请问这个是怎么回事呢 ?

控制台页面404

下载源码。还原nuget,配置数据库正常,设置AgileConfig.Server.Apisite 为启动项,调试发现跳转

http://localhost:5000/ui#/user/initpassword
页面出不来。

配置如下:

{
"Logging": {
"LogLevel": {
"Default": "Information",
"System": "Warning",
"Microsoft": "Warning"
}
},
"adminConsole": true,
"preview_mode": false,
"db": {
"provider": "sqlserver", //sqlite,mysql,sqlserver,npgsql,oracle
//"conn": ""
"conn": "Data Source=xxxxx;User ID=sa;Password=11223Initial Catalog=ApolloConfig;Pooling=true;Min Pool Size=1"
//"conn": "Persist Security Info = False; User ID =dev; Password =dev@123; Initial Catalog =agile_config; Server =."
},
"JwtSetting": {
"SecurityKey": "dfasf343453fsdfa,./,./sdfasf34r3hfhfdb", // 密钥
"Issuer": "agileconfig.admin", // 颁发者
"Audience": "agileconfig.admin", // 接收者
"ExpireSeconds": 86400 // 过期时间
}
}

客户端数量一直为0

客户端可以正常读取服务端配置数据,但是UI界面一直显示0,没有客户端数据,是哪里需要配置吗?

另外一个问题是:查看了本地缓存,只有其中一个应用的缓存,其他应用未发现缓存文件,不知道这个是否正常?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.