Browse Source

feat: 优化日志配置和服务器监听设置 - 修改日志配置,添加服务器地址信息 - 配置服务器监听所有本地地址,端口11003 - 添加logs目录到.gitignore

master
hyh 4 days ago
parent
commit
2c6dd1072f
  1. 4
      .gitignore
  2. 5
      CoreAgent.API/Configurations/logger.json
  3. 16
      CoreAgent.API/Properties/launchSettings.json
  4. 12
      CoreAgent.API/appsettings.json
  5. 98
      CoreAgent.API/logs/log-20250610.txt
  6. 453
      CoreAgent.API/logs/log-20250611.txt
  7. 2
      CoreAgent.Infrastructure/Extensions/Logging/LoggingExtensions.cs
  8. 8
      CoreAgent.Infrastructure/Services/Network/CellularNetworkService.cs

4
.gitignore

@ -14,6 +14,10 @@ project.lock.json
*.pyc
nupkg/
# Logs
logs/
*.log
# Visual Studio Code
.vscode/*
!.vscode/settings.json

5
CoreAgent.API/Configurations/logger.json

@ -3,7 +3,8 @@
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Microsoft": "Information",
"Microsoft.Hosting.Lifetime": "Information",
"System": "Warning"
}
},
@ -25,6 +26,6 @@
}
}
],
"Enrich": [ "FromLogContext" ]
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ]
}
}

16
CoreAgent.API/Properties/launchSettings.json

@ -4,8 +4,8 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:3074",
"sslPort": 44378
"applicationUrl": "http://localhost:11003",
"sslPort": 0
}
},
"profiles": {
@ -14,17 +14,7 @@
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5228",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7133;http://localhost:5228",
"applicationUrl": "http://0.0.0.0:11003",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

12
CoreAgent.API/appsettings.json

@ -2,8 +2,16 @@
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
"Microsoft.AspNetCore": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
"AllowedHosts": "*",
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://0.0.0.0:11003"
}
}
}
}

98
CoreAgent.API/logs/log-20250610.txt

@ -1,98 +0,0 @@
2025-06-10 23:09:05.046 +08:00 [INF] Logger initialized successfully
2025-06-10 23:09:05.092 +08:00 [INF] Application starting...
2025-06-10 23:09:06.063 +08:00 [FTL] Application failed to start: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware': Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate' while attempting to activate 'CoreAgent.Infrastructure.Middleware.ExceptionMiddleware'.)
System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware': Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate' while attempting to activate 'CoreAgent.Infrastructure.Middleware.ExceptionMiddleware'.)
---> System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware': Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate' while attempting to activate 'CoreAgent.Infrastructure.Middleware.ExceptionMiddleware'.
---> System.InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate' while attempting to activate 'CoreAgent.Infrastructure.Middleware.ExceptionMiddleware'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at Program.<Main>$(String[] args) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Program.cs:line 17
2025-06-10 23:09:06.162 +08:00 [FTL] Startup failure details: {"Message":"Some services are not able to be constructed (Error while validating the service descriptor \u0027ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware\u0027: Unable to resolve service for type \u0027Microsoft.AspNetCore.Http.RequestDelegate\u0027 while attempting to activate \u0027CoreAgent.Infrastructure.Middleware.ExceptionMiddleware\u0027.)","StackTrace":" at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection\u00601 serviceDescriptors, ServiceProviderOptions options)\r\n at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)\r\n at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()\r\n at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()\r\n at Program.\u003CMain\u003E$(String[] args) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Program.cs:line 17","Source":"Microsoft.Extensions.DependencyInjection","InnerException":"Error while validating the service descriptor \u0027ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware\u0027: Unable to resolve service for type \u0027Microsoft.AspNetCore.Http.RequestDelegate\u0027 while attempting to activate \u0027CoreAgent.Infrastructure.Middleware.ExceptionMiddleware\u0027."}
2025-06-10 23:09:40.611 +08:00 [INF] Logger initialized successfully
2025-06-10 23:09:40.653 +08:00 [INF] Application starting...
2025-06-10 23:09:40.752 +08:00 [FTL] Application failed to start: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware': Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate' while attempting to activate 'CoreAgent.Infrastructure.Middleware.ExceptionMiddleware'.)
System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware': Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate' while attempting to activate 'CoreAgent.Infrastructure.Middleware.ExceptionMiddleware'.)
---> System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware': Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate' while attempting to activate 'CoreAgent.Infrastructure.Middleware.ExceptionMiddleware'.
---> System.InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate' while attempting to activate 'CoreAgent.Infrastructure.Middleware.ExceptionMiddleware'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at Program.<Main>$(String[] args) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Program.cs:line 17
2025-06-10 23:09:40.820 +08:00 [FTL] Startup failure details: {"Message":"Some services are not able to be constructed (Error while validating the service descriptor \u0027ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware\u0027: Unable to resolve service for type \u0027Microsoft.AspNetCore.Http.RequestDelegate\u0027 while attempting to activate \u0027CoreAgent.Infrastructure.Middleware.ExceptionMiddleware\u0027.)","StackTrace":" at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection\u00601 serviceDescriptors, ServiceProviderOptions options)\r\n at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)\r\n at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()\r\n at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()\r\n at Program.\u003CMain\u003E$(String[] args) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Program.cs:line 17","Source":"Microsoft.Extensions.DependencyInjection","InnerException":"Error while validating the service descriptor \u0027ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware\u0027: Unable to resolve service for type \u0027Microsoft.AspNetCore.Http.RequestDelegate\u0027 while attempting to activate \u0027CoreAgent.Infrastructure.Middleware.ExceptionMiddleware\u0027."}
2025-06-10 23:10:25.939 +08:00 [INF] Logger initialized successfully
2025-06-10 23:10:25.975 +08:00 [INF] Application starting...
2025-06-10 23:10:26.021 +08:00 [FTL] Application failed to start: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware': Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate' while attempting to activate 'CoreAgent.Infrastructure.Middleware.ExceptionMiddleware'.)
System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware': Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate' while attempting to activate 'CoreAgent.Infrastructure.Middleware.ExceptionMiddleware'.)
---> System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware': Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate' while attempting to activate 'CoreAgent.Infrastructure.Middleware.ExceptionMiddleware'.
---> System.InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate' while attempting to activate 'CoreAgent.Infrastructure.Middleware.ExceptionMiddleware'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at Program.<Main>$(String[] args) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Program.cs:line 17
2025-06-10 23:10:26.056 +08:00 [FTL] Startup failure details: {"Message":"Some services are not able to be constructed (Error while validating the service descriptor \u0027ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware\u0027: Unable to resolve service for type \u0027Microsoft.AspNetCore.Http.RequestDelegate\u0027 while attempting to activate \u0027CoreAgent.Infrastructure.Middleware.ExceptionMiddleware\u0027.)","StackTrace":" at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection\u00601 serviceDescriptors, ServiceProviderOptions options)\r\n at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)\r\n at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()\r\n at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()\r\n at Program.\u003CMain\u003E$(String[] args) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Program.cs:line 17","Source":"Microsoft.Extensions.DependencyInjection","InnerException":"Error while validating the service descriptor \u0027ServiceType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware Lifetime: Scoped ImplementationType: CoreAgent.Infrastructure.Middleware.ExceptionMiddleware\u0027: Unable to resolve service for type \u0027Microsoft.AspNetCore.Http.RequestDelegate\u0027 while attempting to activate \u0027CoreAgent.Infrastructure.Middleware.ExceptionMiddleware\u0027."}
2025-06-10 23:11:14.432 +08:00 [INF] Logger initialized successfully
2025-06-10 23:11:14.474 +08:00 [INF] Application starting...
2025-06-10 23:11:14.527 +08:00 [FTL] Application failed to start: Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddAuthorization' in the application startup code.
System.InvalidOperationException: Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddAuthorization' in the application startup code.
at Microsoft.AspNetCore.Builder.AuthorizationAppBuilderExtensions.VerifyServicesRegistered(IApplicationBuilder app)
at Microsoft.AspNetCore.Builder.AuthorizationAppBuilderExtensions.UseAuthorization(IApplicationBuilder app)
at CoreAgent.API.Startup.UseInfrastructure(IApplicationBuilder app, IConfiguration config) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Startup.cs:line 45
at Program.<Main>$(String[] args) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Program.cs:line 28
2025-06-10 23:11:14.601 +08:00 [FTL] Startup failure details: {"Message":"Unable to find the required services. Please add all the required services by calling \u0027IServiceCollection.AddAuthorization\u0027 in the application startup code.","StackTrace":" at Microsoft.AspNetCore.Builder.AuthorizationAppBuilderExtensions.VerifyServicesRegistered(IApplicationBuilder app)\r\n at Microsoft.AspNetCore.Builder.AuthorizationAppBuilderExtensions.UseAuthorization(IApplicationBuilder app)\r\n at CoreAgent.API.Startup.UseInfrastructure(IApplicationBuilder app, IConfiguration config) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Startup.cs:line 45\r\n at Program.\u003CMain\u003E$(String[] args) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Program.cs:line 28","Source":"Microsoft.AspNetCore.Authorization.Policy","InnerException":null}
2025-06-10 23:14:51.039 +08:00 [INF] Logger initialized successfully
2025-06-10 23:14:51.069 +08:00 [INF] Application starting...
2025-06-10 23:14:51.124 +08:00 [FTL] Application failed to start: Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddAuthorization' in the application startup code.
System.InvalidOperationException: Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddAuthorization' in the application startup code.
at Microsoft.AspNetCore.Builder.AuthorizationAppBuilderExtensions.VerifyServicesRegistered(IApplicationBuilder app)
at Microsoft.AspNetCore.Builder.AuthorizationAppBuilderExtensions.UseAuthorization(IApplicationBuilder app)
at CoreAgent.API.Startup.UseInfrastructure(IApplicationBuilder app, IConfiguration config) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Startup.cs:line 45
at Program.<Main>$(String[] args) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Program.cs:line 28
2025-06-10 23:14:51.149 +08:00 [FTL] Startup failure details: {"Message":"Unable to find the required services. Please add all the required services by calling \u0027IServiceCollection.AddAuthorization\u0027 in the application startup code.","StackTrace":" at Microsoft.AspNetCore.Builder.AuthorizationAppBuilderExtensions.VerifyServicesRegistered(IApplicationBuilder app)\r\n at Microsoft.AspNetCore.Builder.AuthorizationAppBuilderExtensions.UseAuthorization(IApplicationBuilder app)\r\n at CoreAgent.API.Startup.UseInfrastructure(IApplicationBuilder app, IConfiguration config) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Startup.cs:line 45\r\n at Program.\u003CMain\u003E$(String[] args) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Program.cs:line 28","Source":"Microsoft.AspNetCore.Authorization.Policy","InnerException":null}
2025-06-10 23:15:27.651 +08:00 [INF] Logger initialized successfully
2025-06-10 23:15:27.682 +08:00 [INF] Application starting...
2025-06-10 23:15:27.735 +08:00 [INF] Application startup completed
2025-06-10 23:23:44.793 +08:00 [INF] Logger initialized successfully
2025-06-10 23:23:44.837 +08:00 [INF] Application starting...
2025-06-10 23:23:45.207 +08:00 [INF] Application startup completed
2025-06-10 23:23:51.434 +08:00 [INF] Request started: GET /api/v1/WeatherForecast
2025-06-10 23:23:51.497 +08:00 [INF] Weather forecast requested
2025-06-10 23:23:51.530 +08:00 [INF] Response for GET /api/v1/WeatherForecast: 200 - [{"date":"2025-06-11","temperatureC":-19,"summary":"Scorching","temperatureF":-2},{"date":"2025-06-12","temperatureC":-11,"summary":"Bracing","temperatureF":13},{"date":"2025-06-13","temperatureC":10,"summary":"Chilly","temperatureF":49},{"date":"2025-06-14","temperatureC":7,"summary":"Mild","temperatureF":44},{"date":"2025-06-15","temperatureC":35,"summary":"Warm","temperatureF":94}]
2025-06-10 23:23:51.547 +08:00 [INF] Request completed: GET /api/v1/WeatherForecast in 119ms with status code 200
2025-06-10 23:24:10.107 +08:00 [INF] Logger initialized successfully
2025-06-10 23:24:10.148 +08:00 [INF] Application starting...
2025-06-10 23:24:10.527 +08:00 [INF] Application startup completed
2025-06-10 23:24:23.522 +08:00 [INF] Request started: GET /api/v1/WeatherForecast
2025-06-10 23:24:23.584 +08:00 [INF] Weather forecast requested
2025-06-10 23:24:23.612 +08:00 [INF] Response for GET /api/v1/WeatherForecast: 200 - [{"date":"2025-06-11","temperatureC":24,"summary":"Warm","temperatureF":75},{"date":"2025-06-12","temperatureC":4,"summary":"Bracing","temperatureF":39},{"date":"2025-06-13","temperatureC":54,"summary":"Chilly","temperatureF":129},{"date":"2025-06-14","temperatureC":-6,"summary":"Freezing","temperatureF":22},{"date":"2025-06-15","temperatureC":-20,"summary":"Sweltering","temperatureF":-3}]
2025-06-10 23:24:23.632 +08:00 [INF] Request completed: GET /api/v1/WeatherForecast in 120ms with status code 200

453
CoreAgent.API/logs/log-20250611.txt

@ -1,453 +0,0 @@
2025-06-11 00:02:46.491 +08:00 [INF] Logger initialized successfully
2025-06-11 00:02:46.529 +08:00 [INF] Application starting...
2025-06-11 00:02:47.971 +08:00 [FTL] Application failed to start: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory': Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'CoreAgent.Infrastructure.Command.CommandStrategyFactory'.)
System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory': Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'CoreAgent.Infrastructure.Command.CommandStrategyFactory'.)
---> System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory': Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'CoreAgent.Infrastructure.Command.CommandStrategyFactory'.
---> System.InvalidOperationException: Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'CoreAgent.Infrastructure.Command.CommandStrategyFactory'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at Program.<Main>$(String[] args) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Program.cs:line 20
2025-06-11 00:02:48.108 +08:00 [FTL] Startup failure details: {"Message":"Some services are not able to be constructed (Error while validating the service descriptor \u0027ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory\u0027: Unable to resolve service for type \u0027Serilog.ILogger\u0027 while attempting to activate \u0027CoreAgent.Infrastructure.Command.CommandStrategyFactory\u0027.)","StackTrace":" at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection\u00601 serviceDescriptors, ServiceProviderOptions options)\r\n at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)\r\n at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()\r\n at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()\r\n at Program.\u003CMain\u003E$(String[] args) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Program.cs:line 20","Source":"Microsoft.Extensions.DependencyInjection","InnerException":"Error while validating the service descriptor \u0027ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory\u0027: Unable to resolve service for type \u0027Serilog.ILogger\u0027 while attempting to activate \u0027CoreAgent.Infrastructure.Command.CommandStrategyFactory\u0027."}
2025-06-11 00:03:56.281 +08:00 [INF] Logger initialized successfully
2025-06-11 00:03:56.316 +08:00 [INF] Application starting...
2025-06-11 00:03:56.362 +08:00 [FTL] Application failed to start: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory': Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'CoreAgent.Infrastructure.Command.CommandStrategyFactory'.)
System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory': Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'CoreAgent.Infrastructure.Command.CommandStrategyFactory'.)
---> System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory': Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'CoreAgent.Infrastructure.Command.CommandStrategyFactory'.
---> System.InvalidOperationException: Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'CoreAgent.Infrastructure.Command.CommandStrategyFactory'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at Program.<Main>$(String[] args) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Program.cs:line 20
2025-06-11 00:03:56.424 +08:00 [FTL] Startup failure details: {"Message":"Some services are not able to be constructed (Error while validating the service descriptor \u0027ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory\u0027: Unable to resolve service for type \u0027Serilog.ILogger\u0027 while attempting to activate \u0027CoreAgent.Infrastructure.Command.CommandStrategyFactory\u0027.)","StackTrace":" at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection\u00601 serviceDescriptors, ServiceProviderOptions options)\r\n at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)\r\n at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()\r\n at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()\r\n at Program.\u003CMain\u003E$(String[] args) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Program.cs:line 20","Source":"Microsoft.Extensions.DependencyInjection","InnerException":"Error while validating the service descriptor \u0027ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory\u0027: Unable to resolve service for type \u0027Serilog.ILogger\u0027 while attempting to activate \u0027CoreAgent.Infrastructure.Command.CommandStrategyFactory\u0027."}
2025-06-11 00:05:46.844 +08:00 [INF] Logger initialized successfully
2025-06-11 00:05:46.881 +08:00 [INF] Application starting...
2025-06-11 00:05:46.923 +08:00 [FTL] Application failed to start: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory': Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'CoreAgent.Infrastructure.Command.CommandStrategyFactory'.)
System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory': Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'CoreAgent.Infrastructure.Command.CommandStrategyFactory'.)
---> System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory': Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'CoreAgent.Infrastructure.Command.CommandStrategyFactory'.
---> System.InvalidOperationException: Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'CoreAgent.Infrastructure.Command.CommandStrategyFactory'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at Program.<Main>$(String[] args) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Program.cs:line 20
2025-06-11 00:05:46.967 +08:00 [FTL] Startup failure details: {"Message":"Some services are not able to be constructed (Error while validating the service descriptor \u0027ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory\u0027: Unable to resolve service for type \u0027Serilog.ILogger\u0027 while attempting to activate \u0027CoreAgent.Infrastructure.Command.CommandStrategyFactory\u0027.)","StackTrace":" at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection\u00601 serviceDescriptors, ServiceProviderOptions options)\r\n at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)\r\n at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()\r\n at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()\r\n at Program.\u003CMain\u003E$(String[] args) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Program.cs:line 20","Source":"Microsoft.Extensions.DependencyInjection","InnerException":"Error while validating the service descriptor \u0027ServiceType: CoreAgent.Domain.Interfaces.ICommandStrategyFactory Lifetime: Singleton ImplementationType: CoreAgent.Infrastructure.Command.CommandStrategyFactory\u0027: Unable to resolve service for type \u0027Serilog.ILogger\u0027 while attempting to activate \u0027CoreAgent.Infrastructure.Command.CommandStrategyFactory\u0027."}
2025-06-11 00:06:35.367 +08:00 [INF] Logger initialized successfully
2025-06-11 00:06:35.401 +08:00 [INF] Application starting...
2025-06-11 00:06:35.925 +08:00 [INF] Application startup completed
2025-06-11 00:18:39.803 +08:00 [INF] Logger initialized successfully
2025-06-11 00:18:39.853 +08:00 [INF] Application starting...
2025-06-11 00:18:42.251 +08:00 [INF] Application startup completed
2025-06-11 00:18:56.881 +08:00 [INF] Logger initialized successfully
2025-06-11 00:18:56.926 +08:00 [INF] Application starting...
2025-06-11 00:18:57.374 +08:00 [INF] Application startup completed
2025-06-11 00:19:06.139 +08:00 [INF] Request started: GET /api/v1/WeatherForecast
2025-06-11 00:19:06.199 +08:00 [INF] Weather forecast requested
2025-06-11 00:19:06.227 +08:00 [INF] Response for GET /api/v1/WeatherForecast: 200 - [{"date":"2025-06-12","temperatureC":39,"summary":"Cool","temperatureF":102},{"date":"2025-06-13","temperatureC":16,"summary":"Cool","temperatureF":60},{"date":"2025-06-14","temperatureC":4,"summary":"Balmy","temperatureF":39},{"date":"2025-06-15","temperatureC":11,"summary":"Freezing","temperatureF":51},{"date":"2025-06-16","temperatureC":-1,"summary":"Chilly","temperatureF":31}]
2025-06-11 00:19:06.245 +08:00 [INF] Request completed: GET /api/v1/WeatherForecast in 111ms with status code 200
2025-06-11 00:28:28.605 +08:00 [INF] Logger initialized successfully
2025-06-11 00:28:28.640 +08:00 [INF] Application starting...
2025-06-11 00:28:28.892 +08:00 [INF] Application startup completed
2025-06-11 00:28:29.786 +08:00 [INF] Application is stopping...
2025-06-11 00:28:29.800 +08:00 [INF] Application has stopped.
2025-06-11 00:28:44.067 +08:00 [INF] Logger initialized successfully
2025-06-11 00:28:44.118 +08:00 [INF] Application starting...
2025-06-11 00:28:44.579 +08:00 [INF] Application startup completed
2025-06-11 00:53:27.958 +08:00 [INF] Logger initialized successfully
2025-06-11 00:53:28.002 +08:00 [INF] Application starting...
2025-06-11 00:53:30.633 +08:00 [INF] Application startup completed
2025-06-11 00:53:37.999 +08:00 [INF] Request started: POST /api/v1/CellularNetwork/start
2025-06-11 00:53:38.120 +08:00 [INF] 收到启动蜂窝网络请求: string
2025-06-11 00:53:38.128 +08:00 [INF] Handling request of type StartCellularNetworkCommand
2025-06-11 00:53:38.225 +08:00 [ERR] Error handling request of type StartCellularNetworkCommand
System.InvalidOperationException: No service for type 'MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean]' has been registered.
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at MediatR.Wrappers.RequestHandlerWrapperImpl`2.<>c__DisplayClass1_0.<Handle>g__Handler|0()
at MediatR.Wrappers.RequestHandlerWrapperImpl`2.Handle(IRequest`1 request, IServiceProvider serviceProvider, CancellationToken cancellationToken)
at MediatR.Mediator.Send[TResponse](IRequest`1 request, CancellationToken cancellationToken)
at CoreAgent.API.Controllers.BaseApiController.HandleRequest[TRequest,TResponse](TRequest request) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Controllers\BaseApiController.cs:line 28
2025-06-11 00:53:38.299 +08:00 [INF] Response for POST /api/v1/CellularNetwork/start: 500 - {"success":false,"message":"No service for type 'MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean]' has been registered.","data":false,"errors":[]}
2025-06-11 00:53:38.323 +08:00 [INF] Request completed: POST /api/v1/CellularNetwork/start in 329ms with status code 500
2025-06-11 00:55:18.744 +08:00 [INF] Logger initialized successfully
2025-06-11 00:55:18.784 +08:00 [INF] Application starting...
2025-06-11 00:55:20.433 +08:00 [FTL] Application failed to start: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.)
System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.)
---> System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.
---> System.InvalidOperationException: Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at Program.<Main>$(String[] args) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Program.cs:line 20
---> (Inner Exception #1) System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.
---> System.InvalidOperationException: Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)<---
---> (Inner Exception #2) System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.
---> System.InvalidOperationException: Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)<---
2025-06-11 00:55:20.556 +08:00 [FTL] Startup failure details: {"Message":"Some services are not able to be constructed (Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027.) (Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler\u0027.) (Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler\u0027.)","StackTrace":" at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection\u00601 serviceDescriptors, ServiceProviderOptions options)\r\n at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)\r\n at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()\r\n at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()\r\n at Program.\u003CMain\u003E$(String[] args) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Program.cs:line 20","Source":"Microsoft.Extensions.DependencyInjection","InnerException":"Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027."}
2025-06-11 00:55:57.494 +08:00 [INF] Logger initialized successfully
2025-06-11 00:55:57.538 +08:00 [INF] Application starting...
2025-06-11 00:55:59.958 +08:00 [INF] Application startup completed
2025-06-11 00:56:06.299 +08:00 [INF] Request started: POST /api/v1/CellularNetwork/start
2025-06-11 00:56:06.419 +08:00 [INF] 收到启动蜂窝网络请求: string
2025-06-11 00:56:06.426 +08:00 [INF] Handling request of type StartCellularNetworkCommand
2025-06-11 00:56:06.507 +08:00 [ERR] Error handling request of type StartCellularNetworkCommand
System.InvalidOperationException: No service for type 'MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean]' has been registered.
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at MediatR.Wrappers.RequestHandlerWrapperImpl`2.<>c__DisplayClass1_0.<Handle>g__Handler|0()
at MediatR.Wrappers.RequestHandlerWrapperImpl`2.Handle(IRequest`1 request, IServiceProvider serviceProvider, CancellationToken cancellationToken)
at MediatR.Mediator.Send[TResponse](IRequest`1 request, CancellationToken cancellationToken)
at CoreAgent.API.Controllers.BaseApiController.HandleRequest[TRequest,TResponse](TRequest request) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Controllers\BaseApiController.cs:line 28
2025-06-11 00:56:06.555 +08:00 [INF] Response for POST /api/v1/CellularNetwork/start: 500 - {"success":false,"message":"No service for type 'MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean]' has been registered.","data":false,"errors":[]}
2025-06-11 00:56:06.573 +08:00 [INF] Request completed: POST /api/v1/CellularNetwork/start in 281ms with status code 500
2025-06-11 00:57:56.184 +08:00 [INF] Logger initialized successfully
2025-06-11 00:57:56.241 +08:00 [INF] Application starting...
2025-06-11 00:57:58.051 +08:00 [FTL] Application failed to start: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.)
System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.)
---> System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.
---> System.InvalidOperationException: Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at Program.<Main>$(String[] args) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Program.cs:line 20
---> (Inner Exception #1) System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.
---> System.InvalidOperationException: Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)<---
---> (Inner Exception #2) System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.
---> System.InvalidOperationException: Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)<---
2025-06-11 00:57:58.199 +08:00 [FTL] Startup failure details: {"Message":"Some services are not able to be constructed (Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027.) (Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler\u0027.) (Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler\u0027.)","StackTrace":" at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection\u00601 serviceDescriptors, ServiceProviderOptions options)\r\n at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)\r\n at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()\r\n at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()\r\n at Program.\u003CMain\u003E$(String[] args) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Program.cs:line 20","Source":"Microsoft.Extensions.DependencyInjection","InnerException":"Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027."}
2025-06-11 00:59:14.196 +08:00 [INF] Logger initialized successfully
2025-06-11 00:59:14.238 +08:00 [INF] Application starting...
2025-06-11 00:59:14.293 +08:00 [FTL] Application failed to start: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.)
System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.)
---> System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.
---> System.InvalidOperationException: Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at Program.<Main>$(String[] args) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Program.cs:line 20
---> (Inner Exception #1) System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.
---> System.InvalidOperationException: Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)<---
---> (Inner Exception #2) System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.
---> System.InvalidOperationException: Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)<---
2025-06-11 00:59:14.363 +08:00 [FTL] Startup failure details: {"Message":"Some services are not able to be constructed (Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027.) (Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler\u0027.) (Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler\u0027.)","StackTrace":" at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection\u00601 serviceDescriptors, ServiceProviderOptions options)\r\n at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)\r\n at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()\r\n at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()\r\n at Program.\u003CMain\u003E$(String[] args) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Program.cs:line 20","Source":"Microsoft.Extensions.DependencyInjection","InnerException":"Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027."}
2025-06-11 01:00:05.938 +08:00 [INF] Logger initialized successfully
2025-06-11 01:00:05.995 +08:00 [INF] Application starting...
2025-06-11 01:00:07.598 +08:00 [FTL] Application failed to start: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.)
System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.) (Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.)
---> System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.
---> System.InvalidOperationException: Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at Program.<Main>$(String[] args) in D:\HistoryCode\CoreAgent\src\CoreAgent.API\Program.cs:line 20
---> (Inner Exception #1) System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.
---> System.InvalidOperationException: Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)<---
---> (Inner Exception #2) System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: MediatR.IRequestHandler`2[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler': Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.
---> System.InvalidOperationException: Unable to resolve service for type 'CoreAgent.Domain.Interfaces.ICellularNetworkService' while attempting to activate 'CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)<---
2025-06-11 01:00:07.709 +08:00 [FTL] Startup failure details: {"Message":"Some services are not able to be constructed (Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027.) (Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.StartCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.StartCellularNetworkCommandHandler\u0027.) (Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.StopCellularNetworkCommand,System.Boolean] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.StopCellularNetworkCommandHandler\u0027.)","StackTrace":" at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection\u00601 serviceDescriptors, ServiceProviderOptions options)\r\n at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)\r\n at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()\r\n at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()\r\n at Program.\u003CMain\u003E$(String[] args) in D:\\HistoryCode\\CoreAgent\\src\\CoreAgent.API\\Program.cs:line 20","Source":"Microsoft.Extensions.DependencyInjection","InnerException":"Error while validating the service descriptor \u0027ServiceType: MediatR.IRequestHandler\u00602[CoreAgent.Application.Commands.CellularNetwork.GetCellularNetworkStatusCommand,CoreAgent.Application.Commands.CellularNetwork.CellularNetworkStatus] Lifetime: Transient ImplementationType: CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027: Unable to resolve service for type \u0027CoreAgent.Domain.Interfaces.ICellularNetworkService\u0027 while attempting to activate \u0027CoreAgent.Application.Handlers.CellularNetwork.GetCellularNetworkStatusCommandHandler\u0027."}
2025-06-11 01:00:38.549 +08:00 [INF] Logger initialized successfully
2025-06-11 01:00:38.593 +08:00 [INF] Application starting...
2025-06-11 01:00:39.229 +08:00 [INF] Application startup completed
2025-06-11 01:00:55.414 +08:00 [INF] Application is stopping...
2025-06-11 01:00:55.429 +08:00 [INF] Application has stopped.
2025-06-11 01:01:08.260 +08:00 [INF] Logger initialized successfully
2025-06-11 01:01:08.310 +08:00 [INF] Application starting...
2025-06-11 01:01:08.769 +08:00 [INF] Application startup completed
2025-06-11 01:01:13.658 +08:00 [INF] Request started: POST /api/v1/CellularNetwork/start
2025-06-11 01:01:13.801 +08:00 [INF] 收到启动蜂窝网络请求: string
2025-06-11 01:01:13.807 +08:00 [INF] Handling request of type StartCellularNetworkCommand
2025-06-11 01:01:13.820 +08:00 [INF] 正在启动蜂窝网络接口: string
2025-06-11 01:01:13.827 +08:00 [INF] 正在启动蜂窝网络接口: string
2025-06-11 01:01:15.013 +08:00 [ERR] 启动蜂窝网络接口失败: string
System.Exception: 命令执行失败:
at CoreAgent.Infrastructure.Services.CellularNetworkService.ExecuteCommandAsync(String command) in D:\HistoryCode\CoreAgent\src\CoreAgent.Infrastructure\Services\CellularNetworkService.cs:line 117
at CoreAgent.Infrastructure.Services.CellularNetworkService.StartAsync(String interfaceName, CellularNetworkConfig config) in D:\HistoryCode\CoreAgent\src\CoreAgent.Infrastructure\Services\CellularNetworkService.cs:line 28
2025-06-11 01:01:15.049 +08:00 [WRN] 蜂窝网络接口 string 启动失败
2025-06-11 01:01:15.073 +08:00 [INF] Response for POST /api/v1/CellularNetwork/start: 200 - {"success":true,"message":null,"data":false,"errors":[]}
2025-06-11 01:01:15.088 +08:00 [INF] Request completed: POST /api/v1/CellularNetwork/start in 1436ms with status code 200
2025-06-11 10:05:49.558 +08:00 [INF] Logger initialized successfully
2025-06-11 10:05:49.605 +08:00 [INF] Application starting...
2025-06-11 10:05:50.814 +08:00 [INF] Application startup completed
2025-06-11 10:06:02.084 +08:00 [INF] Request started: GET /api/v1/WeatherForecast
2025-06-11 10:06:02.133 +08:00 [INF] Weather forecast requested
2025-06-11 10:06:02.152 +08:00 [INF] Response for GET /api/v1/WeatherForecast: 200 - [{"date":"2025-06-12","temperatureC":35,"summary":"Balmy","temperatureF":94},{"date":"2025-06-13","temperatureC":18,"summary":"Hot","temperatureF":64},{"date":"2025-06-14","temperatureC":11,"summary":"Cool","temperatureF":51},{"date":"2025-06-15","temperatureC":47,"summary":"Cool","temperatureF":116},{"date":"2025-06-16","temperatureC":-1,"summary":"Chilly","temperatureF":31}]
2025-06-11 10:06:02.158 +08:00 [INF] Request completed: GET /api/v1/WeatherForecast in 80ms with status code 200
2025-06-11 10:06:14.992 +08:00 [INF] Request started: POST /api/v1/CellularNetwork/start
2025-06-11 10:06:15.055 +08:00 [INF] 收到启动蜂窝网络请求: string
2025-06-11 10:06:15.059 +08:00 [INF] Handling request of type StartCellularNetworkCommand
2025-06-11 10:06:15.063 +08:00 [INF] 正在启动蜂窝网络接口: string
2025-06-11 10:06:15.064 +08:00 [INF] 蜂窝网络接口 string 启动成功
2025-06-11 10:06:15.073 +08:00 [INF] Response for POST /api/v1/CellularNetwork/start: 200 - {"data":true,"isSuccess":true,"message":"操作成功","errorCode":"","statusCode":200}
2025-06-11 10:06:15.074 +08:00 [INF] Request completed: POST /api/v1/CellularNetwork/start in 82ms with status code 200
2025-06-11 10:34:57.416 +08:00 [INF] Logger initialized successfully
2025-06-11 10:34:57.453 +08:00 [INF] Application starting...
2025-06-11 10:34:58.566 +08:00 [INF] Application startup completed
2025-06-11 10:35:03.081 +08:00 [INF] Request started: GET /api/v1/WeatherForecast
2025-06-11 10:35:03.162 +08:00 [INF] Weather forecast requested
2025-06-11 10:35:03.186 +08:00 [INF] Response for GET /api/v1/WeatherForecast: 200 - [{"date":"2025-06-12","temperatureC":37,"summary":"Bracing","temperatureF":98},{"date":"2025-06-13","temperatureC":-15,"summary":"Warm","temperatureF":6},{"date":"2025-06-14","temperatureC":-17,"summary":"Chilly","temperatureF":2},{"date":"2025-06-15","temperatureC":12,"summary":"Chilly","temperatureF":53},{"date":"2025-06-16","temperatureC":49,"summary":"Chilly","temperatureF":120}]
2025-06-11 10:35:03.194 +08:00 [INF] Request completed: GET /api/v1/WeatherForecast in 119ms with status code 200
2025-06-11 10:35:07.873 +08:00 [INF] Request started: POST /api/v1/CellularNetwork/start
2025-06-11 10:35:07.926 +08:00 [INF] 收到启动蜂窝网络请求: string
2025-06-11 10:35:07.928 +08:00 [INF] Handling request of type StartCellularNetworkCommand
2025-06-11 10:35:07.932 +08:00 [INF] 正在启动蜂窝网络接口: string
2025-06-11 10:35:07.933 +08:00 [INF] 蜂窝网络接口 string 启动成功
2025-06-11 10:35:07.945 +08:00 [INF] Response for POST /api/v1/CellularNetwork/start: 200 - {"data":true,"isSuccess":true,"message":"操作成功","errorCode":"","statusCode":200}
2025-06-11 10:35:07.947 +08:00 [INF] Request completed: POST /api/v1/CellularNetwork/start in 74ms with status code 200
2025-06-11 10:55:01.399 +08:00 [INF] Logger initialized successfully
2025-06-11 10:55:01.437 +08:00 [INF] Application starting...
2025-06-11 10:55:02.444 +08:00 [INF] Application startup completed
2025-06-11 10:55:09.051 +08:00 [INF] Request started: GET /api/v1/WeatherForecast
2025-06-11 10:55:09.100 +08:00 [INF] Weather forecast requested
2025-06-11 10:55:09.118 +08:00 [INF] Response for GET /api/v1/WeatherForecast: 200 - [{"date":"2025-06-12","temperatureC":5,"summary":"Hot","temperatureF":40},{"date":"2025-06-13","temperatureC":34,"summary":"Sweltering","temperatureF":93},{"date":"2025-06-14","temperatureC":-8,"summary":"Scorching","temperatureF":18},{"date":"2025-06-15","temperatureC":38,"summary":"Hot","temperatureF":100},{"date":"2025-06-16","temperatureC":41,"summary":"Hot","temperatureF":105}]
2025-06-11 10:55:09.126 +08:00 [INF] Request completed: GET /api/v1/WeatherForecast in 82ms with status code 200
2025-06-11 10:55:14.506 +08:00 [INF] Request started: POST /api/v1/CellularNetwork/stop
2025-06-11 10:55:14.548 +08:00 [INF] 收到停止蜂窝网络请求: string
2025-06-11 10:55:14.551 +08:00 [INF] Handling request of type StopCellularNetworkCommand
2025-06-11 10:55:14.555 +08:00 [INF] 正在停止蜂窝网络接口: string
2025-06-11 10:55:14.556 +08:00 [INF] 蜂窝网络接口 string 停止成功
2025-06-11 10:55:14.567 +08:00 [INF] Response for POST /api/v1/CellularNetwork/stop: 200 - {"data":true,"isSuccess":true,"message":"操作成功","errorCode":"","statusCode":200}
2025-06-11 10:55:14.571 +08:00 [INF] Request completed: POST /api/v1/CellularNetwork/stop in 65ms with status code 200
2025-06-11 10:55:18.635 +08:00 [INF] Request started: POST /api/v1/CellularNetwork/start
2025-06-11 10:55:18.648 +08:00 [INF] 收到启动蜂窝网络请求: string
2025-06-11 10:55:18.648 +08:00 [INF] Handling request of type StartCellularNetworkCommand
2025-06-11 10:55:18.650 +08:00 [INF] 正在启动蜂窝网络接口: string
2025-06-11 10:55:18.651 +08:00 [INF] 蜂窝网络接口 string 启动成功
2025-06-11 10:55:18.652 +08:00 [INF] Response for POST /api/v1/CellularNetwork/start: 200 - {"data":true,"isSuccess":true,"message":"操作成功","errorCode":"","statusCode":200}
2025-06-11 10:55:18.655 +08:00 [INF] Request completed: POST /api/v1/CellularNetwork/start in 19ms with status code 200
2025-06-11 12:01:37.925 +08:00 [INF] Logger initialized successfully
2025-06-11 12:01:37.959 +08:00 [INF] Application starting...
2025-06-11 12:01:38.940 +08:00 [INF] Application startup completed
2025-06-11 12:01:44.947 +08:00 [INF] Request started: POST /api/v1/CellularNetwork/start
2025-06-11 12:01:45.036 +08:00 [INF] 收到启动蜂窝网络请求: string
2025-06-11 12:01:45.038 +08:00 [INF] Handling request of type StartCellularNetworkCommand
2025-06-11 12:01:45.043 +08:00 [INF] 正在启动蜂窝网络接口: string
2025-06-11 12:01:45.046 +08:00 [INF] 正在启动蜂窝网络接口: string
2025-06-11 12:01:45.048 +08:00 [INF] 正在配置蜂窝网络接口: string
2025-06-11 12:01:45.533 +08:00 [ERR] 配置APN失败
2025-06-11 12:01:45.535 +08:00 [ERR] 配置蜂窝网络参数失败
2025-06-11 12:01:45.536 +08:00 [WRN] 蜂窝网络接口 string 启动失败
2025-06-11 12:01:45.557 +08:00 [INF] Response for POST /api/v1/CellularNetwork/start: 200 - {"data":false,"isSuccess":true,"message":"操作成功","errorCode":"","statusCode":200}
2025-06-11 12:01:45.562 +08:00 [INF] Request completed: POST /api/v1/CellularNetwork/start in 620ms with status code 200
2025-06-11 17:26:37.953 +08:00 [INF] Logger initialized successfully
2025-06-11 17:26:37.990 +08:00 [INF] Application starting...
2025-06-11 17:26:38.963 +08:00 [INF] Application startup completed
2025-06-11 17:35:10.311 +08:00 [INF] Request started: POST /api/v1/CellularNetwork/start
2025-06-11 17:35:10.395 +08:00 [INF] 收到启动蜂窝网络请求: string
2025-06-11 17:35:10.397 +08:00 [INF] Handling request of type StartCellularNetworkCommand
2025-06-11 17:35:10.401 +08:00 [INF] 正在启动蜂窝网络接口: string
2025-06-11 17:35:41.810 +08:00 [INF] Logger initialized successfully
2025-06-11 17:35:41.873 +08:00 [INF] Application starting...
2025-06-11 17:35:42.238 +08:00 [INF] Application startup completed
2025-06-11 17:35:48.997 +08:00 [INF] Request started: POST /api/v1/CellularNetwork/start
2025-06-11 17:35:49.098 +08:00 [INF] 收到启动蜂窝网络请求: string
2025-06-11 17:35:49.102 +08:00 [INF] Handling request of type StartCellularNetworkCommand
2025-06-11 17:35:49.108 +08:00 [INF] 正在启动蜂窝网络接口: string
2025-06-11 17:36:00.832 +08:00 [INF] 正在启动蜂窝网络接口: string
2025-06-11 23:03:09.183 +08:00 [INF] Logger initialized successfully
2025-06-11 23:03:09.207 +08:00 [INF] Application starting...
2025-06-11 23:03:10.909 +08:00 [INF] Application startup completed
2025-06-11 23:03:21.198 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:03:21.236 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:03:21.261 +08:00 [INF] Response for GET /api/v1/NetworkConfig: 200 - {"data":[],"isSuccess":true,"message":"操作成功","errorCode":"","statusCode":200}
2025-06-11 23:03:21.267 +08:00 [INF] Request completed: GET /api/v1/NetworkConfig in 73ms with status code 200
2025-06-11 23:06:56.130 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:06:56.135 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:12:09.338 +08:00 [INF] Logger initialized successfully
2025-06-11 23:12:09.360 +08:00 [INF] Application starting...
2025-06-11 23:12:11.093 +08:00 [INF] Application startup completed
2025-06-11 23:12:17.970 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:12:18.001 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:12:39.226 +08:00 [INF] Logger initialized successfully
2025-06-11 23:12:39.252 +08:00 [INF] Application starting...
2025-06-11 23:12:39.560 +08:00 [INF] Application startup completed
2025-06-11 23:12:43.773 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:12:43.802 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:12:50.443 +08:00 [INF] Response for GET /api/v1/NetworkConfig: 200 - {"data":[],"isSuccess":true,"message":"操作成功","errorCode":"","statusCode":200}
2025-06-11 23:12:50.447 +08:00 [INF] Request completed: GET /api/v1/NetworkConfig in 6677ms with status code 200
2025-06-11 23:12:53.114 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:12:53.118 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:12:56.241 +08:00 [INF] Response for GET /api/v1/NetworkConfig: 200 - {"data":[],"isSuccess":true,"message":"操作成功","errorCode":"","statusCode":200}
2025-06-11 23:12:56.244 +08:00 [INF] Request completed: GET /api/v1/NetworkConfig in 3129ms with status code 200
2025-06-11 23:12:58.245 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:12:58.249 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:14:11.713 +08:00 [INF] Logger initialized successfully
2025-06-11 23:14:11.735 +08:00 [INF] Application starting...
2025-06-11 23:14:11.950 +08:00 [INF] Application startup completed
2025-06-11 23:14:16.729 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:14:16.760 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:15:52.058 +08:00 [INF] Logger initialized successfully
2025-06-11 23:15:52.085 +08:00 [INF] Application starting...
2025-06-11 23:15:52.306 +08:00 [INF] Application startup completed
2025-06-11 23:15:56.713 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:15:56.743 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:27:44.015 +08:00 [INF] Logger initialized successfully
2025-06-11 23:27:44.041 +08:00 [INF] Application starting...
2025-06-11 23:27:44.270 +08:00 [INF] Application startup completed
2025-06-11 23:27:48.801 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:27:48.831 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:27:52.841 +08:00 [INF] Response for GET /api/v1/NetworkConfig: 200 - {"data":[{"configKey":null,"ragConfig":null,"coreOrImsConfigs":[],"apn":null,"band":[],"comment":null}],"isSuccess":true,"message":"操作成功","errorCode":"","statusCode":200}
2025-06-11 23:27:52.847 +08:00 [INF] Request completed: GET /api/v1/NetworkConfig in 4049ms with status code 200
2025-06-11 23:28:03.795 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:28:03.799 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:30:26.955 +08:00 [INF] Logger initialized successfully
2025-06-11 23:30:26.978 +08:00 [INF] Application starting...
2025-06-11 23:30:27.187 +08:00 [INF] Application startup completed
2025-06-11 23:30:34.014 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:30:34.053 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:32:01.737 +08:00 [INF] Logger initialized successfully
2025-06-11 23:32:01.759 +08:00 [INF] Application starting...
2025-06-11 23:32:02.037 +08:00 [INF] Application startup completed
2025-06-11 23:32:08.601 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:32:08.635 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:34:48.328 +08:00 [INF] Logger initialized successfully
2025-06-11 23:34:48.351 +08:00 [INF] Application starting...
2025-06-11 23:34:48.570 +08:00 [INF] Application startup completed
2025-06-11 23:34:52.677 +08:00 [INF] Request started: GET /api/v1/NetworkConfig
2025-06-11 23:34:52.706 +08:00 [INF] Handling request of type GetAllNetworkConfigurationsQuery
2025-06-11 23:35:14.323 +08:00 [INF] Response for GET /api/v1/NetworkConfig: 200 - {"data":[{"configKey":"Default","ragConfig":"Config/Ran/default.cfg","coreOrImsConfigs":[{"index":1,"plmn":"46000","coreNetworkConfig":"Config/CoreNetwork/plmn_46000.cfg","imsConfig":"Config/Ims/plmn_46000.cfg"},{"index":2,"plmn":"46001","coreNetworkConfig":"Config/CoreNetwork/plmn_46001.cfg","imsConfig":"Config/Ims/plmn_46001.cfg"}],"apn":"Internet","band":["B1","B3","B5","B8"],"comment":"默认网络配置"}],"isSuccess":true,"message":"操作成功","errorCode":"","statusCode":200}
2025-06-11 23:35:14.328 +08:00 [INF] Request completed: GET /api/v1/NetworkConfig in 21656ms with status code 200
2025-06-11 23:35:48.286 +08:00 [INF] Request started: GET /api/v1/NetworkConfig/Default
2025-06-11 23:35:48.325 +08:00 [INF] Handling request of type GetNetworkConfigurationByKeyQuery
2025-06-11 23:35:57.061 +08:00 [INF] Response for GET /api/v1/NetworkConfig/Default: 200 - {"data":{"configKey":"Default","ragConfig":"Config/Ran/default.cfg","coreOrImsConfigs":[{"index":1,"plmn":"46000","coreNetworkConfig":"Config/CoreNetwork/plmn_46000.cfg","imsConfig":"Config/Ims/plmn_46000.cfg"},{"index":2,"plmn":"46001","coreNetworkConfig":"Config/CoreNetwork/plmn_46001.cfg","imsConfig":"Config/Ims/plmn_46001.cfg"}],"apn":"Internet","band":["B1","B3","B5","B8"],"comment":"默认网络配置"},"isSuccess":true,"message":"操作成功","errorCode":"","statusCode":200}
2025-06-11 23:35:57.063 +08:00 [INF] Request completed: GET /api/v1/NetworkConfig/Default in 8778ms with status code 200

2
CoreAgent.Infrastructure/Extensions/Logging/LoggingExtensions.cs

@ -28,6 +28,8 @@ public static class LoggingExtensions
{
loggingBuilder.ClearProviders();
loggingBuilder.AddSerilog(dispose: true);
loggingBuilder.AddConsole();
loggingBuilder.SetMinimumLevel(LogLevel.Information);
});
return services;

8
CoreAgent.Infrastructure/Services/Network/CellularNetworkService.cs

@ -150,10 +150,10 @@ public class CellularNetworkService : ICellularNetworkService
}
// 5. 等待连接
if (!await WaitForConnectionAsync(key))
{
return false;
}
//if (!await WaitForConnectionAsync(key))
//{
// return false;
//}
// 6. 更新状态
state.MarkAsStarted();

Loading…
Cancel
Save