Open weiwxg opened 1 week ago
Please check this document https://abp.io/docs/latest/solution-templates/layered-web-application/deployment/deployment-docker-compose
builder.SetIssuer(new Uri(configuration["AuthServer:Authority"]));
It still doesn't work after adding builder.SetIssuer(new Uri(configuration["AuthServer:Authority"]));
if (!hostingEnvironment.IsDevelopment())
{
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options =>
{
options.AddDevelopmentEncryptionAndSigningCertificate = false;
});
PreConfigure<OpenIddictServerBuilder>(serverBuilder =>
{
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "aeef0d8c-7288-4d0c-9454-72338dd8111c");
serverBuilder.SetIssuer(new Uri(configuration["AuthServer:Authority"]));
});
}
docker-compose.yml
authserver:
image: reg.biw.com/im/main/authserver:latest
container_name: authserver
build:
context: .
dockerfile: src/Jee.Im.System.AuthServer/Dockerfile
environment:
- ASPNETCORE_URLS=https://+:443;http://+:80;
- Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx
- Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc
- App__SelfUrl=https://localhost:5200
- App__CorsOrigins=https://localhost:5201,https://localhost:5202,https://localhost:5203,https://localhost:5204,https://localhost:5601,http://localhost:5602,http://localhost:5603,http://localhost:5604
- App__RedirectAllowedUrls=https://localhost:5201,https://localhost:5202,https://localhost:5203,https://localhost:5204,https://localhost:5601,http://localhost:5602,http://localhost:5603,http://localhost:5604
- AuthServer__Authority=https://localhost:5200/
- ConnectionStrings__Default=Server=mysql;Port=3306;Database=im_system;Uid=root;Pwd=123456
- Redis__Configuration=redis
ports:
- "5200:443"
depends_on:
- mysql
- redis
restart: on-failure
volumes:
- ./certs:/root/certificate
system-api:
image: reg.biw.com/im/main/system-api:latest
container_name: system-api
hostname: system-api
build:
context: .
dockerfile: src/Jee.Im.System.HttpApi/Host/Dockerfile
environment:
- ASPNETCORE_URLS=https://+:443;http://+:80;
- Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx
- Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc
- App__SelfUrl=https://localhost:5201
- App__CorsOrigins=https://localhost:5601
- AuthServer__Authority=https://localhost:5200/
- AuthServer__RequireHttpsMetadata=true
- AuthServer__SwaggerClientId=System_Swagger
- ConnectionStrings__Default=Server=mysql;Port=3306;Database=im_system;Uid=root;Pwd=123456
- Redis__Configuration=redis
ports:
- "5201:443"
depends_on:
- mysql
- redis
restart: on-failure
volumes:
- ./certs:/root/certificate
Please check and share your app error logs.
The log of server system-api as below:
2024-11-06 14:03:14 [06:03:14 INF] Request starting HTTP/2 GET https://localhost:5201/abp/Swashbuckle/SetCsrfCookie - null null
2024-11-06 14:03:14 [06:03:14 INF] Failed to validate the token.
2024-11-06 14:03:14 Microsoft.IdentityModel.Tokens.SecurityTokenInvalidIssuerException: IDX10204: Unable to validate issuer. validationParameters.ValidIssuer is null or whitespace AND validationParameters.ValidIssuers is null or empty.
2024-11-06 14:03:14 at Microsoft.IdentityModel.Tokens.Validators.ValidateIssuerAsync(String issuer, SecurityToken securityToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-11-06 14:03:14 at Microsoft.IdentityModel.Tokens.Validators.ValidateIssuer(String issuer, SecurityToken securityToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-11-06 14:03:14 at Microsoft.IdentityModel.Tokens.InternalValidators.ValidateAfterSignatureFailed(SecurityToken securityToken, Nullable`1 notBefore, Nullable`1 expires, IEnumerable`1 audiences, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-11-06 14:03:14 at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateSignature(JsonWebToken jwtToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-11-06 14:03:14 at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateSignatureAndIssuerSecurityKey(JsonWebToken jsonWebToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-11-06 14:03:14 at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateJWSAsync(JsonWebToken jsonWebToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-11-06 14:03:14 [06:03:14 INF] Bearer was not authenticated. Failure message: IDX10204: Unable to validate issuer. validationParameters.ValidIssuer is null or whitespace AND validationParameters.ValidIssuers is null or empty.
2024-11-06 14:03:15 [06:03:14 INF] Executing endpoint 'Volo.Abp.Swashbuckle.AbpSwashbuckleController.SetCsrfCookie (Volo.Abp.Swashbuckle)'
2024-11-06 14:03:15 [06:03:15 INF] Route matched with {area = "Abp", action = "SetCsrfCookie", controller = "AbpSwashbuckle", page = ""}. Executing controller action with signature Void SetCsrfCookie() on controller Volo.Abp.Swashbuckle.AbpSwashbuckleController (Volo.Abp.Swashbuckle).
2024-11-06 14:03:15 [06:03:15 INF] Executed action Volo.Abp.Swashbuckle.AbpSwashbuckleController.SetCsrfCookie (Volo.Abp.Swashbuckle) in 16.8575ms
2024-11-06 14:03:15 [06:03:15 INF] Executed endpoint 'Volo.Abp.Swashbuckle.AbpSwashbuckleController.SetCsrfCookie (Volo.Abp.Swashbuckle)'
2024-11-06 14:03:15 [06:03:15 INF] Request finished HTTP/2 GET https://localhost:5201/abp/Swashbuckle/SetCsrfCookie - 204 null null 107.9089ms
2024-11-06 14:03:15 [06:03:15 INF] Request starting HTTP/2 GET https://localhost:5201/api/identity/roles/all - null null
2024-11-06 14:03:15 [06:03:15 INF] Failed to validate the token.
2024-11-06 14:03:15 Microsoft.IdentityModel.Tokens.SecurityTokenInvalidIssuerException: IDX10204: Unable to validate issuer. validationParameters.ValidIssuer is null or whitespace AND validationParameters.ValidIssuers is null or empty.
2024-11-06 14:03:15 at Microsoft.IdentityModel.Tokens.Validators.ValidateIssuerAsync(String issuer, SecurityToken securityToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-11-06 14:03:15 at Microsoft.IdentityModel.Tokens.Validators.ValidateIssuer(String issuer, SecurityToken securityToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-11-06 14:03:15 at Microsoft.IdentityModel.Tokens.InternalValidators.ValidateAfterSignatureFailed(SecurityToken securityToken, Nullable`1 notBefore, Nullable`1 expires, IEnumerable`1 audiences, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-11-06 14:03:15 at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateSignature(JsonWebToken jwtToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-11-06 14:03:15 at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateSignatureAndIssuerSecurityKey(JsonWebToken jsonWebToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-11-06 14:03:15 at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateJWSAsync(JsonWebToken jsonWebToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-11-06 14:03:15 [06:03:15 INF] Bearer was not authenticated. Failure message: IDX10204: Unable to validate issuer. validationParameters.ValidIssuer is null or whitespace AND validationParameters.ValidIssuers is null or empty.
2024-11-06 14:03:15 [06:03:15 INF] Executing endpoint 'Volo.Abp.Identity.IdentityRoleController.GetAllListAsync (Volo.Abp.Identity.HttpApi)'
2024-11-06 14:03:15 [06:03:15 INF] Route matched with {area = "identity", controller = "Role", action = "GetAllList", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.ListResultDto`1[Volo.Abp.Identity.IdentityRoleDto]] GetAllListAsync() on controller Volo.Abp.Identity.IdentityRoleController (Volo.Abp.Identity.HttpApi).
2024-11-06 14:03:15 [06:03:15 INF] Authorization failed. These requirements were not met:
2024-11-06 14:03:15 PermissionRequirement: AbpIdentity.Roles
2024-11-06 14:03:15 [06:03:15 WRN] ---------- RemoteServiceErrorInfo ----------
2024-11-06 14:03:15 {
2024-11-06 14:03:15 "code": "Volo.Authorization:010001",
2024-11-06 14:03:15 "message": "授权失败!提供的策略尚未授予。",
2024-11-06 14:03:15 "details": null,
2024-11-06 14:03:15 "data": {},
2024-11-06 14:03:15 "validationErrors": null
2024-11-06 14:03:15 }
2024-11-06 14:03:15
2024-11-06 14:03:15 [06:03:15 WRN] Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown.
2024-11-06 14:03:15 Volo.Abp.Authorization.AbpAuthorizationException: Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown.
2024-11-06 14:03:15 at Microsoft.AspNetCore.Authorization.AbpAuthorizationServiceExtensions.CheckAsync(IAuthorizationService authorizationService, AuthorizationPolicy policy)
2024-11-06 14:03:15 at Volo.Abp.Authorization.MethodInvocationAuthorizationService.CheckAsync(MethodInvocationAuthorizationContext context)
2024-11-06 14:03:15 at Volo.Abp.Authorization.AuthorizationInterceptor.AuthorizeAsync(IAbpMethodInvocation invocation)
2024-11-06 14:03:15 at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
2024-11-06 14:03:15 at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
2024-11-06 14:03:15 at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
2024-11-06 14:03:15 at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
2024-11-06 14:03:15 at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
2024-11-06 14:03:15 at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
2024-11-06 14:03:15 at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
2024-11-06 14:03:15 at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
2024-11-06 14:03:15 at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
2024-11-06 14:03:15 at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
2024-11-06 14:03:15 at lambda_method2028(Closure, Object)
2024-11-06 14:03:15 at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
2024-11-06 14:03:15 at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
2024-11-06 14:03:15 at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2024-11-06 14:03:15 at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
2024-11-06 14:03:15 at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
2024-11-06 14:03:15 at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
2024-11-06 14:03:15 --- End of stack trace from previous location ---
2024-11-06 14:03:15 at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2024-11-06 14:03:15 [06:03:15 WRN] Code:Volo.Authorization:010001
2024-11-06 14:03:15 [06:03:15 INF] AuthenticationScheme: Bearer was challenged.
2024-11-06 14:03:15 [06:03:15 INF] Executed action Volo.Abp.Identity.IdentityRoleController.GetAllListAsync (Volo.Abp.Identity.HttpApi) in 184.9514ms
2024-11-06 14:03:15 [06:03:15 INF] Executed endpoint 'Volo.Abp.Identity.IdentityRoleController.GetAllListAsync (Volo.Abp.Identity.HttpApi)'
2024-11-06 14:03:15 [06:03:15 INF] Request finished HTTP/2 GET https://localhost:5201/api/identity/roles/all - 401 0 null 432.3762ms
IDX10204: Unable to validate issuer. validationParameters.ValidIssuer is null or whitespace AND validationParameters.ValidIssuers is null or empty.
See https://abp.io/support/questions/8139/Authentication-Cookie-is-not-being-saved-on-Angular-application#answer-3a15d675-1aad-a178-7bb5-c22ffd45ead5 https://github.com/abpframework/abp/issues/20034#issuecomment-2165727328
Thanks @maliming, I figured it out by adding this code to the services, adding the auth server on the list of valid issuers:
options.TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters
{
ValidIssuers = [configuration["AuthServer:Authority"]!.EnsureEndsWith('/')],
SignatureValidator = (token, parameters) => new JsonWebToken(token)
};
But I still wandering why this problem didn't occur when deploying these servers in IIS?
Another error occured in Web
service:
2024-11-06 16:15:41 [08:15:41 INF] Request starting HTTP/2 GET https://localhost:5601/ - null null
2024-11-06 16:15:41 [08:15:41 INF] Authorization failed. These requirements were not met:
2024-11-06 16:15:41 DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
2024-11-06 16:15:41 [08:15:41 ERR] An unhandled exception has occurred while executing the request.
2024-11-06 16:15:41 System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://localhost:5200/.well-known/openid-configuration'. Will retry at '2024/11/6 08:15:43 +00:00'. Exception: 'System.IO.IOException: IDX20804: Unable to retrieve document from: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.
2024-11-06 16:15:41 ---> System.Net.Http.HttpRequestException: Connection refused (localhost:5200)
2024-11-06 16:15:41 ---> System.Net.Sockets.SocketException (111): Connection refused
2024-11-06 16:15:41 at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
2024-11-06 16:15:41 at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
2024-11-06 16:15:41 at System.Net.Sockets.Socket.1.WaitWithCancellationAsync(CancellationToken cancellationToken) 2024-11-06 16:15:41 at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) 2024-11-06 16:15:41 at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 2024-11-06 16:15:41 at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 2024-11-06 16:15:41 at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) 2024-11-06 16:15:41 at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.SendAsyncAndRetryOnNetworkError(HttpClient httpClient, Uri uri) 2024-11-06 16:15:41 at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) 2024-11-06 16:15:41 --- End of inner exception stack trace --- 2024-11-06 16:15:41 at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) 2024-11-06 16:15:41 at Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfigurationRetriever.GetAsync(String address, IDocumentRetriever retriever, CancellationToken cancel) 2024-11-06 16:15:41 at Microsoft.IdentityModel.Protocols.ConfigurationManager
1.GetConfigurationAsync(CancellationToken cancel)'.
2024-11-06 16:15:41 ---> System.IO.IOException: IDX20804: Unable to retrieve document from: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.
2024-11-06 16:15:41 ---> System.Net.Http.HttpRequestException: Connection refused (localhost:5200)
2024-11-06 16:15:41 ---> System.Net.Sockets.SocketException (111): Connection refused
2024-11-06 16:15:41 at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
2024-11-06 16:15:41 at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
2024-11-06 16:15:41 at System.Net.Sockets.Socket.1.WaitWithCancellationAsync(CancellationToken cancellationToken) 2024-11-06 16:15:41 at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) 2024-11-06 16:15:41 at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 2024-11-06 16:15:41 at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 2024-11-06 16:15:41 at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) 2024-11-06 16:15:41 at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.SendAsyncAndRetryOnNetworkError(HttpClient httpClient, Uri uri) 2024-11-06 16:15:41 at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) 2024-11-06 16:15:41 --- End of inner exception stack trace --- 2024-11-06 16:15:41 at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) 2024-11-06 16:15:41 at Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfigurationRetriever.GetAsync(String address, IDocumentRetriever retriever, CancellationToken cancel) 2024-11-06 16:15:41 at Microsoft.IdentityModel.Protocols.ConfigurationManager
1.GetConfigurationAsync(CancellationToken cancel)
2024-11-06 16:15:41 --- End of inner exception stack trace ---
2024-11-06 16:15:41 at Microsoft.IdentityModel.Protocols.ConfigurationManager1.GetConfigurationAsync(CancellationToken cancel) 2024-11-06 16:15:41 at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsyncInternal(AuthenticationProperties properties) 2024-11-06 16:15:41 at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsync(AuthenticationProperties properties) 2024-11-06 16:15:41 at Microsoft.AspNetCore.Authentication.AuthenticationHandler
1.ChallengeAsync(AuthenticationProperties properties)
2024-11-06 16:15:41 at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)
2024-11-06 16:15:41 at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.<>cDisplayClass0_0.<1[Microsoft.AspNetCore.Mvc.ActionResult] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationRequestDto) on controller Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController (Volo.Abp.AspNetCore.Mvc). 2024-11-06 16:15:41 [08:15:41 INF] Route matched with {area = "Abp", action = "Get", controller = "AbpApplicationConfigurationScript", page = ""}. Executing controller action with signature System.Threading.Tasks.Task
1[Microsoft.AspNetCore.Mvc.ActionResult] Get() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController (Volo.Abp.AspNetCore.Mvc).
2024-11-06 16:15:41 [08:15:41 INF] Route matched with {area = "Abp", action = "GetAll", controller = "AbpServiceProxyScript", page = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult GetAll(Volo.Abp.AspNetCore.Mvc.ProxyScripting.ServiceProxyGenerationModel) on controller Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController (Volo.Abp.AspNetCore.Mvc).
2024-11-06 16:15:41 [08:15:41 INF] The file /bundles/LeptonXLite.Global.990E1D9D56F35BC96DF720644CF93F6F.css was not modified
2024-11-06 16:15:41 [08:15:41 INF] The file /bundles/LeptonXLite.Global.C8BD9C08002E46065415D954057C9304.js was not modified
2024-11-06 16:15:41 [08:15:41 INF] Request finished HTTP/2 GET https://localhost:5601/__bundles/LeptonXLite.Global.C8BD9C08002E46065415D954057C9304.js?_v=638664777226181839 - 304 null application/javascript 2.4233ms
2024-11-06 16:15:41 [08:15:41 INF] Request finished HTTP/2 GET https://localhost:5601/__bundles/LeptonXLite.Global.990E1D9D56F35BC96DF720644CF93F6F.css?_v=638664777218758918 - 304 null text/css 2.4552ms
2024-11-06 16:15:41 [08:15:41 INF] Executing ContentResult with HTTP Response ContentType of application/javascript
2024-11-06 16:15:41 [08:15:41 INF] Executed action Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc) in 4.9677ms
2024-11-06 16:15:41 [08:15:41 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)'
2024-11-06 16:15:41 [08:15:41 INF] Request finished HTTP/2 GET https://localhost:5601/Abp/ServiceProxyScript - 200 2497 application/javascript 6.6981ms
2024-11-06 16:15:41 [08:15:41 INF] Executing ContentResult with HTTP Response ContentType of application/javascript
2024-11-06 16:15:41 [08:15:41 INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc) in 12.2878ms
2024-11-06 16:15:41 [08:15:41 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)'
2024-11-06 16:15:41 [08:15:41 INF] Request finished HTTP/2 GET https://localhost:5601/Abp/ApplicationConfigurationScript - 200 2238 application/javascript 14.2265ms
2024-11-06 16:15:41 [08:15:41 INF] Executing ContentResult with HTTP Response ContentType of application/javascript
2024-11-06 16:15:41 [08:15:41 INF] Executed action Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 19.9231ms
2024-11-06 16:15:41 [08:15:41 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
2024-11-06 16:15:41 [08:15:41 INF] Request finished HTTP/2 GET https://localhost:5601/Abp/ApplicationLocalizationScript?cultureName=zh-Hans - 200 34688 application/javascript 21.8078ms
docker-compose.yml:
system-web:
image: reg.biw.com/im/main/system-web:latest
container_name: system-web
build:
context: ../../
dockerfile: Jee.Im.System/src/Jee.Im.System.Web/Dockerfile
environment:
- ASPNETCORE_URLS=https://+:443;http://+:80;
- Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx
- Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc
- App__SelfUrl=https://localhost:5601
- RemoteServices__Default__BaseUrl=http://system-api
- AuthServer__Authority=https://localhost:5200/
- AuthServer__RequireHttpsMetadata=false
- AuthServer__ClientId=System_Web
- AuthServer__ClientSecret=1q2w3e*
- AuthServer__IsContainerized=true
- AuthServer__MetaAddress=https://localhost:5200/
- ConnectionStrings__Default=Server=mysql;Port=3306;Database=im_system;Uid=root;Pwd=123456
- Redis__Configuration=redis
ports:
- "5601:443"
restart: on-failure
volumes:
- ./certs:/root/certificate
I created a layered project based on ABP Framework 8.2 and deployed it to the local environment using Docker Desktop. When I call the API in Swagger, an error occurs.
The Dockerfile files for several projects are as follows:
The
docker-compose.yml
file:Run docker-compose to start the project, and access https://localhost:5201/swagger/index.html.