Hi,
I manipulate the AppUser by my custom EmployeeService. While trying to send password reset code, i have the below error. What kind of configuration I have to do?
<br> await this._accountAppService.SendPasswordResetCodeAsync(new SendPasswordResetCodeDto { Email=identityUser.Email, AppName= this._configuration["App:SelfUrl"] });
<br> Configure<AppUrlOptions>(options => { options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"]; options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "Account/ResetPassword"; options.Applications["Angular"].Urls[AccountUrlNames.EmailConfirmation] = "Account/EmailConfirmation"; });
<br> Provide the following information to reduce the conversation steps:
at Volo.Abp.UI.Navigation.Urls.AppUrlProvider.<GetUrlAsync>d__12.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at Volo.Abp.Account.Emailing.AccountEmailer.<SendPasswordResetLinkAsync>d__16.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Volo.Abp.Account.AccountAppService.<SendPasswordResetCodeAsync>d__14.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Castle.DynamicProxy.AsyncInterceptorBase.<ProceedAsynchronous>d__13.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.<ProceedAsync>d__7.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Volo.Abp.Auditing.AuditingInterceptor.<InterceptAsync>d__3.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.<InterceptAsync>d__2.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Castle.DynamicProxy.AsyncInterceptorBase.<ProceedAsynchronous>d__13.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.<ProceedAsync>d__7.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Volo.Abp.Validation.ValidationInterceptor.<InterceptAsync>d__2.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.<InterceptAsync>d__2.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Castle.DynamicProxy.AsyncInterceptorBase.<ProceedAsynchronous>d__13.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.<ProceedAsync>d__7.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Volo.Abp.Uow.UnitOfWorkInterceptor.<InterceptAsync>d__3.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.<InterceptAsync>d__2.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at HrInOne.Employees.EmployeeAppService.<CreateAsync>d__10.MoveNext() in ...\aspnet-core\src\HrInOne.Application\Employees\EmployeeAppService.cs:line 115
Thanks @liangshiwei. It works. I think i misguided myself, missed the options. Applications["Angular"] declaration.
Hi,
We migrated to PostgreSql(v 12.0) from Ms Sql. Right after login action we have below error. I checked recent posts but couldn't find similar issue. Could you help me please?
[00:38:58 INF] Request starting HTTP/2 OPTIONS https://localhost:44313/.well-known/openid-configuration - -
[00:38:58 INF] CORS policy execution successful.
[00:38:58 INF] Request finished HTTP/2 OPTIONS https://localhost:44313/.well-known/openid-configuration - - - 204 - - 0.9575ms
[00:38:58 INF] Request starting HTTP/2 GET https://localhost:44313/.well-known/openid-configuration - -
[00:38:58 INF] CORS policy execution successful.
[00:38:58 DBG] CORS request made for path: /.well-known/openid-configuration from origin: http://localhost:4200
[00:38:58 DBG] CorsPolicyService allowed origin: http://localhost:4200
[00:38:58 INF] CORS policy execution successful.
[00:38:58 DBG] Request path /.well-known/openid-configuration matched to endpoint type Discovery
[00:38:58 DBG] Endpoint enabled: Discovery, successfully created handler: IdentityServer4.Endpoints.DiscoveryEndpoint
[00:38:58 INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryEndpoint for /.well-known/openid-configuration
[00:38:58 DBG] Start discovery request
[00:38:58 INF] Request finished HTTP/2 GET https://localhost:44313/.well-known/openid-configuration - - - 200 - application/json;+charset=UTF-8 274.6857ms
[00:38:58 INF] Request starting HTTP/2 OPTIONS https://localhost:44313/.well-known/openid-configuration/jwks - -
[00:38:58 INF] CORS policy execution successful.
[00:38:58 INF] Request finished HTTP/2 OPTIONS https://localhost:44313/.well-known/openid-configuration/jwks - - - 204 - - 0.7712ms
[00:38:58 INF] Request starting HTTP/2 GET https://localhost:44313/.well-known/openid-configuration/jwks - -
[00:38:58 INF] CORS policy execution successful.
[00:38:59 DBG] CORS request made for path: /.well-known/openid-configuration/jwks from origin: http://localhost:4200
[00:38:59 DBG] CorsPolicyService allowed origin: http://localhost:4200
[00:38:59 INF] CORS policy execution successful.
[00:38:59 DBG] Request path /.well-known/openid-configuration/jwks matched to endpoint type Discovery
[00:38:59 DBG] Endpoint enabled: Discovery, successfully created handler: IdentityServer4.Endpoints.DiscoveryKeyEndpoint
[00:38:59 INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryKeyEndpoint for /.well-known/openid-configuration/jwks
[00:38:59 DBG] Start key discovery request
[00:38:59 INF] Request finished HTTP/2 GET https://localhost:44313/.well-known/openid-configuration/jwks - - - 200 - application/json;+charset=UTF-8 60.2183ms
[00:38:59 INF] Request starting HTTP/2 OPTIONS https://localhost:44313/api/abp/application-configuration - -
[00:38:59 INF] CORS policy execution successful.
[00:38:59 INF] Request finished HTTP/2 OPTIONS https://localhost:44313/api/abp/application-configuration - - - 204 - - 1.7764ms
[00:38:59 INF] Request starting HTTP/2 GET https://localhost:44313/api/abp/application-configuration - -
[00:38:59 INF] CORS policy execution successful.
[00:38:59 DBG] CORS request made for path: /api/abp/application-configuration from origin: http://localhost:4200 but was ignored because path was not for an allowed IdentityServer CORS endpoint
[00:38:59 INF] No CORS policy found for the specified request.
[00:38:59 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
[00:38:59 INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc).
[00:38:59 DBG] Executing AbpApplicationConfigurationAppService.GetAsync()...
[00:38:59 DBG] Executed AbpApplicationConfigurationAppService.GetAsync().
[00:38:59 INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto'.
[00:38:59 INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 262.8591ms
[00:38:59 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
[00:38:59 INF] Request finished HTTP/2 GET https://localhost:44313/api/abp/application-configuration - - - 200 - application/json;+charset=utf-8 326.1312ms
[00:39:03 INF] Request starting HTTP/2 GET https://localhost:44313/connect/authorize?response_type=code&client_id=******_App&state=c3JZcXhlNWFXRmpmQ1FjNEtrUkhoUFdkT3lXanF0aDFtSWxPdFZ1Y35rS2pn&redirect_uri=http%3A%2F%2Flocalhost%3A4200&scope=openid%20offline_access%******&code_challenge=zFFCoC_GVfeJ6Acg01P9v3B_RR__SzGrEnc76Zz8rAk&code_challenge_method=S256&nonce=c3JZcXhlNWFXRmpmQ1FjNEtrUkhoUFdkT3lXanF0aDFtSWxPdFZ1Y35rS2pn - -
[00:39:03 DBG] Request path /connect/authorize matched to endpoint type Authorize
[00:39:03 DBG] Endpoint enabled: Authorize, successfully created handler: IdentityServer4.Endpoints.AuthorizeEndpoint
[00:39:03 INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.AuthorizeEndpoint for /connect/authorize
[00:39:03 DBG] Start authorize request
[00:39:03 DBG] User in authorize request: 03d8b7d1-7356-8f2b-8871-39f5ea699ea2
[00:39:03 DBG] Start authorize request protocol validation
[00:39:03 DBG] Batch acquisition of 1 triggers
[00:39:03 DBG] Calling Execute on job DEFAULT.Volo.Abp.BackgroundJobs.BackgroundJobWorker
[00:39:03 DBG] Trigger instruction : NoInstruction
[00:39:03 DBG] client configuration validation for client *******_App succeeded.
[00:39:03 DBG] Checking for PKCE parameters
[00:39:03 DBG] Calling into custom validator: IdentityServer4.Validation.DefaultCustomAuthorizeRequestValidator
[00:39:03 DBG] ValidatedAuthorizeRequest
{"ClientId":"HrI*******nOne_App","ClientName":"*****_App","RedirectUri":"http://localhost:4200","AllowedRedirectUris":["http://localhost:4200","https://**************etest.azurewebsites.net"],"SubjectId":"03d8b7d1-7356-8f2b-8871-39f5ea699ea2","ResponseType":"code","ResponseMode":"query","GrantType":"authorization_code","RequestedScopes":"openid offline_access *******","State":"c3JZcXhlNWFXRmpmQ1FjNEtrUkhoUFdkT3lXanF0aDFtSWxPdFZ1Y35rS2pn","UiLocales":null,"Nonce":"c3JZcXhlNWFXRmpmQ1FjNEtrUkhoUFdkT3lXanF0aDFtSWxPdFZ1Y35rS2pn","AuthenticationContextReferenceClasses":null,"DisplayMode":null,"PromptMode":"","MaxAge":null,"LoginHint":null,"SessionId":"3966E76C2DB7D69F37920B5AEE970152","Raw":{"response_type":"code","client_id":"*******","state":"c3JZcXhlNWFXRmpmQ1FjNEtrUkhoUFdkT3lXanF0aDFtSWxPdFZ1Y35rS2pn","redirect_uri":"http://localhost:4200","scope":"openid offline_access *******","code_challenge":"zFFCoC_GVfeJ6Acg01P9v3B_RR__SzGrEnc76Zz8rAk","code_challenge_method":"S256","nonce":"c3JZcXhlNWFXRmpmQ1FjNEtrUkhoUFdkT3lXanF0aDFtSWxPdFZ1Y35rS2pn"},"$type":"AuthorizeRequestValidationLog"}
[00:39:03 DBG] Client is configured to not require consent, no consent is required
[00:39:03 DBG] Creating Authorization Code Flow response.
[00:39:08 DBG] Batch acquisition of 1 triggers
[00:39:08 DBG] Calling Execute on job DEFAULT.Volo.Abp.BackgroundJobs.BackgroundJobWorker
[00:39:08 DBG] Trigger instruction : NoInstruction
[00:39:13 DBG] Batch acquisition of 1 triggers
[00:39:13 DBG] Calling Execute on job DEFAULT.Volo.Abp.BackgroundJobs.BackgroundJobWorker
[00:39:13 DBG] Trigger instruction : NoInstruction
[00:39:15 DBG] Batch acquisition of 1 triggers
[00:39:15 DBG] Calling Execute on job DEFAULT.NotificationWorkerQuartz
[00:39:15 DBG] Trigger instruction : NoInstruction
[00:39:18 DBG] Batch acquisition of 1 triggers
[00:39:18 DBG] Calling Execute on job DEFAULT.Volo.Abp.BackgroundJobs.BackgroundJobWorker
[00:39:18 DBG] Trigger instruction : NoInstruction
[00:39:22 ERR] An error occurred using a transaction.
[00:39:22 ERR] An error occurred using a transaction.
[00:39:22 FTL] Unhandled exception: Cannot access a disposed object.
Object name: 'NpgsqlTransaction'.
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'NpgsqlTransaction'.
at Npgsql.NpgsqlTransaction.CheckDisposed()
at Npgsql.NpgsqlTransaction.CheckReady()
at Npgsql.NpgsqlTransaction.Commit(Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlTransaction.Commit()
at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.Commit()
at Volo.Abp.Uow.EntityFrameworkCore.EfCoreTransactionApi.Commit()
at Volo.Abp.Uow.EntityFrameworkCore.EfCoreTransactionApi.CommitAsync()
at Volo.Abp.Uow.UnitOfWork.CommitTransactionsAsync()
at Volo.Abp.Uow.UnitOfWork.CompleteAsync(CancellationToken cancellationToken)
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Volo.Abp.IdentityServer.Grants.PersistedGrantStore.StoreAsync(PersistedGrant grant)
at IdentityServer4.Stores.DefaultGrantStore`1.StoreItemAsync(String key, T item, String clientId, String subjectId, String sessionId, String description, DateTime created, Nullable`1 expiration, Nullable`1 consumedTime)
at IdentityServer4.Stores.DefaultGrantStore`1.CreateItemAsync(T item, String clientId, String subjectId, String sessionId, String description, DateTime created, Int32 lifetime)
at IdentityServer4.ResponseHandling.AuthorizeResponseGenerator.CreateCodeFlowResponseAsync(ValidatedAuthorizeRequest request)
at IdentityServer4.ResponseHandling.AuthorizeResponseGenerator.CreateResponseAsync(ValidatedAuthorizeRequest request)
at IdentityServer4.Endpoints.AuthorizeEndpointBase.ProcessAuthorizeRequestAsync(NameValueCollection parameters, ClaimsPrincipal user, ConsentResponse consent)
at IdentityServer4.Endpoints.AuthorizeEndpoint.ProcessAsync(HttpContext context)
at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
[00:39:22 ERR] An unhandled exception has occurred while executing the request.
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'NpgsqlTransaction'.
at Npgsql.NpgsqlTransaction.CheckDisposed()
at Npgsql.NpgsqlTransaction.CheckReady()
at Npgsql.NpgsqlTransaction.Commit(Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlTransaction.Commit()
at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.Commit()
at Volo.Abp.Uow.EntityFrameworkCore.EfCoreTransactionApi.Commit()
at Volo.Abp.Uow.EntityFrameworkCore.EfCoreTransactionApi.CommitAsync()
at Volo.Abp.Uow.UnitOfWork.CommitTransactionsAsync()
at Volo.Abp.Uow.UnitOfWork.CompleteAsync(CancellationToken cancellationToken)
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Volo.Abp.IdentityServer.Grants.PersistedGrantStore.StoreAsync(PersistedGrant grant)
at IdentityServer4.Stores.DefaultGrantStore`1.StoreItemAsync(String key, T item, String clientId, String subjectId, String sessionId, String description, DateTime created, Nullable`1 expiration, Nullable`1 consumedTime)
at IdentityServer4.Stores.DefaultGrantStore`1.CreateItemAsync(T item, String clientId, String subjectId, String sessionId, String description, DateTime created, Int32 lifetime)
at IdentityServer4.ResponseHandling.AuthorizeResponseGenerator.CreateCodeFlowResponseAsync(ValidatedAuthorizeRequest request)
at IdentityServer4.ResponseHandling.AuthorizeResponseGenerator.CreateResponseAsync(ValidatedAuthorizeRequest request)
at IdentityServer4.Endpoints.AuthorizeEndpointBase.ProcessAuthorizeRequestAsync(NameValueCollection parameters, ClaimsPrincipal user, ConsentResponse consent)
at IdentityServer4.Endpoints.AuthorizeEndpoint.ProcessAsync(HttpContext context)
at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context)
at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpJwtTokenMiddlewareExtension.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
[00:39:22 INF] Request finished HTTP/2 GET https://localhost:44313/connect/authorize?response_type=code&client_id=*******&state=c3JZcXhlNWFXRmpmQ1FjNEtrUkhoUFdkT3lXanF0aDFtSWxPdFZ1Y35rS2pn&redirect_uri=http%3A%2F%2Flocalhost%3A4200&scope=openid%20offline_access%20_____&code_challenge=zFFCoC_GVfeJ6Acg01P9v3B_RR__SzGrEnc76Zz8rAk&code_challenge_method=S256&nonce=c3JZcXhlNWFXRmpmQ1FjNEtrUkhoUFdkT3lXanF0aDFtSWxPdFZ1Y35rS2pn - - - 500 - text/html;+charset=utf-8 19663.0314ms
[00:39:23 DBG] Batch acquisition of 1 triggers
Thanks maliming,
Now it is working.
Having "invalid issuer in discovery document expected: https://remoteIp current: http://remoteIp" error when trying to access application over localhost:4200 or http://remoteIp:4200/(frontend on the remote machine)
Here is the app environment specifications
We deploy our application by docker-compose on our pipe definition; frontend : docker-compose up -d --build
version: '3'
services:
web:
build:
context: .
# dockerfile: Dockerfile.dev
ports:
- "8080:443"
stdin_open: true
volumes:
- /app/node_modules
- .:/app
backend : docker-compose up -d --scale api=2 --build
version: '3'
services:
nginx:
image: nginx:alpine
hostname: 'nginx'
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/proxy.conf:/etc/nginx/proxy.conf:ro
- ./nginx/logs/:/var/log/nginx/
- ./nginx/certs:/etc/nginx/certs
ports:
- '80:80'
- '443:443'
depends_on:
- api
restart: always
api:
build: ./
stdin_open: true
ports:
- '44313'
restart: always
<br> Angular environment file;
import { Environment } from '@abp/ng.core';
const baseUrl = 'http://remoteIp:4200';
export const environment = {
production: false,
application: {
baseUrl,
name: 'AppName'
},
oAuthConfig: {
issuer: 'https://remoteIp',
redirectUri: baseUrl,
clientId: 'AppName_App',
responseType: 'code',
scope: 'offline_access moduleOne'
},
apis: {
default: {
url: 'https://remoteIp',
rootNamespace: 'ModuleOne'
},
ModuleTwo: {
rootNamespace: "ModuleTwo",
url: 'https://remoteIp'
}
},
localization: {
defaultResourceName: 'moduleOne'
}
} as Environment;
appsettings.json <br>
{
"App": {
"SelfUrl": "https://178.157.14.10",
"CorsOrigins": "https://*.appname.com,http://localhost:4200,http://remoteIp:4200," },
"ConnectionStrings": {
"Default": "connString1",
"Module2": "connString2"
},
"AuthServer": {
"Authority": "https://remoteIp"
}
}
Nginx conf file
user nginx;
worker_processes auto;
events { worker_connections 1024; }
http {
include /etc/nginx/proxy.conf;
include /etc/nginx/mime.types;
limit_req_zone $binary_remote_addr zone=one:10m rate=5r/s;
server_tokens off;
sendfile on;
keepalive_timeout 29;
client_body_timeout 10;
client_header_timeout 10;
send_timeout 10;
upstream webapi {
server api:44313;
}
server {
listen *:80 default_server;
add_header Strict-Transport-Security max-age=15768000;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name $hostname;
ssl_certificate /etc/nginx/certs/AppNameApi.crt;
ssl_certificate_key /etc/nginx/certs/AppNameApi.key;
ssl_protocols TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error_log crit;
location / {
proxy_pass https://webapi;
proxy_set_header Host $host:44313;
error_log /var/log/apierrors.log;
limit_req zone=one burst=10 nodelay;
}
}
}
And the result is as below, both from remote front end and the local are the same. I couldn't see any errors others than "invalid issuer in discovery document expected: [https://remoteIp] current: [http://remoteIp]". After this exception as if everything is frozen. No action could be made.
By the way I should mention that we don't get error when trying it on local without nginx. Why are we having this error, could you help us please? P.S. We reviewed the record with #465(which is relevant to the same error) and try everything mentioned. (I can give remote addresses if needed in advance.)
check that your issuer is configured as:
issuer: 'https://localhost:44313',
inenvironment.prod.ts
also be aware that these are local addresses. when you deploy it to prod, you need to set it to your real domain names.
Any comment?
This is the thread which I suffered with I think. https://github.com/dotnet/aspnetcore/issues/7246 You are right, it's not about abp. We have to check our certificate file. Thanks for your support anyway.