Activities of "can.ercan"

Answer

Hi Problem is solved.

Thanks, Can Ercan

Answer

Hi,

When i tried to login from https://merlinvoip.com i didn't get the previous error but when i logged in and then redirected to client app i didn't appear to be logged in and the log shows:

2021-09-21 13:01:15.892 +00:00 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.TokenEndpoint for /connect/token
2021-09-21 13:01:15.920 +00:00 [INF] {"ClientId":"TestApp2_App","AuthenticationMethod":"NoSecret","Category":"Authentication","Name":"Client Authentication Success","EventType":"Success","Id":1010,"Message":null,"ActivityId":"800001a7-0000-cb00-b63f-84710c7967bb","TimeStamp":"2021-09-21T13:01:15.0000000Z","ProcessId":6384,"LocalIpAddress":"10.11.0.130:443","RemoteIpAddress":"88.243.86.198","$type":"ClientAuthenticationSuccessEvent"}
2021-09-21 13:01:15.995 +00:00 [INF] Token request validation success, {"ClientId":"TestApp2_App","ClientName":"TestApp2_App","GrantType":"authorization_code","Scopes":null,"AuthorizationCode":"****82BB","RefreshToken":"********","UserName":null,"AuthenticationContextReferenceClasses":null,"Tenant":null,"IdP":null,"Raw":{"grant_type":"authorization_code","code":"9A7EC69860CCE8494775D54C5FC01816A1480304478A2AEE49CE7BE5037382BB","redirect_uri":"https://merlinvoip.com","code_verifier":"N3RuWU5BWHFfN2dDfkpuazVaQko4ZnNrMGpzdmJ6UFBtVVRVcnphSWl0MU1j","client_id":"TestApp2_App"},"$type":"TokenRequestValidationLog"}
2021-09-21 13:01:16.152 +00:00 [INF] {"ClientId":"TestApp2_App","ClientName":"TestApp2_App","RedirectUri":null,"Endpoint":"Token","SubjectId":"04a49bf7-0341-52cf-f8c8-39fef527ad38","Scopes":"openid offline_access TestApp2","GrantType":"authorization_code","Tokens":[{"TokenType":"id_token","TokenValue":"****YXBg","$type":"Token"},{"TokenType":"refresh_token","TokenValue":"****DF50","$type":"Token"},{"TokenType":"access_token","TokenValue":"****803Q","$type":"Token"}],"Category":"Token","Name":"Token Issued Success","EventType":"Success","Id":2000,"Message":null,"ActivityId":"800001a7-0000-cb00-b63f-84710c7967bb","TimeStamp":"2021-09-21T13:01:16.0000000Z","ProcessId":6384,"LocalIpAddress":"10.11.0.130:443","RemoteIpAddress":"88.243.86.198","$type":"TokenIssuedSuccessEvent"}
2021-09-21 13:01:16.205 +00:00 [INF] Request finished HTTP/1.1 POST https://pbxticketapi.azurewebsites.net/connect/token application/x-www-form-urlencoded 233 - 200 - application/json;+charset=UTF-8 386.8135ms
2021-09-21 13:01:16.283 +00:00 [INF] Request starting HTTP/1.1 OPTIONS https://pbxticketapi.azurewebsites.net/api/abp/application-configuration - -
2021-09-21 13:01:16.283 +00:00 [INF] CORS policy execution successful.
2021-09-21 13:01:16.283 +00:00 [INF] Request finished HTTP/1.1 OPTIONS https://pbxticketapi.azurewebsites.net/api/abp/application-configuration - - - 204 - - 0.5517ms
2021-09-21 13:01:16.363 +00:00 [INF] Request starting HTTP/1.1 GET https://pbxticketapi.azurewebsites.net/api/abp/application-configuration - -
2021-09-21 13:01:16.363 +00:00 [INF] CORS policy execution successful.
2021-09-21 13:01:16.402 +00:00 [INF] Failed to validate the token.
Microsoft.IdentityModel.Tokens.SecurityTokenInvalidIssuerException: IDX10205: Issuer validation failed. Issuer: 'System.String'. Did not match: validationParameters.ValidIssuer: 'System.String' or validationParameters.ValidIssuers: 'System.String'.
   at Microsoft.IdentityModel.Tokens.Validators.ValidateIssuer(String issuer, SecurityToken securityToken, TokenValidationParameters validationParameters)
   at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateIssuer(String issuer, JwtSecurityToken jwtToken, TokenValidationParameters validationParameters)
   at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateTokenPayload(JwtSecurityToken jwtToken, TokenValidationParameters validationParameters)
   at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, TokenValidationParameters validationParameters, SecurityToken& validatedToken)
   at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()

One thing I noticed is identity server uses the https://pbxticketapi.azurewebsites.net url.I used to use this url but i changed it.

"App": {
  "SelfUrl": "https://api.merlinvoip.com",
  "AngularUrl": "https://{{tenantName}}.merlinvoip.com",
  "CorsOrigins": "https://merlinvoip.com,https://*.merlinvoip.com"    
}
"AuthServer": {
  "Authority": "https://api.merlinvoip.com",
  "RequireHttpsMetadata": "false",
  "SwaggerClientId": "TestApp2_Swagger",
  "SwaggerClientSecret": "1q2w3e*"
},

Angular environment variables:
oAuthConfig: {
  issuer: 'http://{0}.api.merlinvoip.com',
  redirectUri: baseUrl,
  clientId: 'TestApp2_App',
  responseType: 'code',
  scope: 'offline_access TestApp2',
  requireHttps: false
},
apis: {
  default: {
    url: 'http://{0}.api.merlinvoip.com',
    rootNamespace: 'TestApp2',
  },
},

These are my settings but system still uses the old url for identity server. I cleared cookies and caches and restarted both apps but still the old url is used. Is it in the database somewhere?

Thanks, Can Ercan

Answer

Hmm ok, I couldn't find it in the sample project so i removed it. Sample project code:

"App": {
    "SelfUrl": "https://api.getabp.net:44301",
    "CorsOrigins": "https://*.ng.getabp.net:4200,https://ng.getabp.net:4200/"
  }
Configure<AppUrlOptions>(options =>
{
   options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
   options.Applications["Angular"].RootUrl = configuration["App:ClientUrl"];
   options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password";
   });

Should i put https://merlinvoip.com or https://*.merlinvoip.com

I remember trying with https://*.merlinvoip.com and getting invalid uri error from IdentityServer.

Answer

Configure<AppUrlOptions>(options => { options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"]; options.Applications["Angular"].RootUrl = configuration["App:AngularUrl"]; options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password"; options.Applications["Angular"].Urls[AccountUrlNames.EmailConfirmation] = "account/email-confirmation"; );

Answer

Hi,

I updated the HttpApiHostModule according to the sample app link you provided like below:

    context.Services.AddAbpStrictRedirectUriValidator();
    context.Services.AddAbpClientConfigurationValidator();
    context.Services.AddAbpWildcardSubdomainCorsPolicyService();
    Configure<AbpTenantResolveOptions>(options =>
    {       
        options.AddDomainTenantResolver("{0}.api.merlinvoip.com");
    });

My appsettings.json file:

{
"App": {
  "SelfUrl": "https://api.merlinvoip.com",
  "CorsOrigins": "https://merlinvoip.com,https://*.merlinvoip.com"
},
"Redis": {
  "Configuration": "127.0.0.1"
},
"ConnectionStrings": {
  "Default": ""
},
"AuthServer": {
  "Authority": "https://api.merlinvoip.com",
  "RequireHttpsMetadata": "false",
  "SwaggerClientId": "TestApp2_Swagger",
  "SwaggerClientSecret": "1q2w3e*"
},
"StringEncryption": {
  "DefaultPassPhrase": "rL1OCmPHd9IOQZ7w"
},
"Settings": {
  "Volo.Abp.LeptonTheme.Style": "Style6",
  "Volo.Abp.LeptonTheme.Layout.MenuPlacement": "Left",
  "Volo.Abp.LeptonTheme.Layout.MenuStatus": "AlwaysOpened",
  "Volo.Abp.LeptonTheme.Layout.Boxed": "False"
}
}

**DbMigrator appsettings.json:**
{
"ConnectionStrings": {
  "Default": ""
},
"IdentityServer": {
  "Clients": {
    "TestApp2_App": {
      "ClientId": "TestApp2_App",
      "ClientSecret": "1q2w3e*",
      "RootUrl": "https://{0}.merlinvoip.com"
    },
  
    "TestApp2_Swagger": {
      "ClientId": "TestApp2_Swagger",
      "RootUrl": "https://api.merlinvoip.com"
    }
  }
}
}
**My angular client environment variables:** 

const baseUrl = 'https://{0}.merlinvoip.com';
export const environment = {
production: true,
application: {
  baseUrl,
  name: 'TestApp2',
},
oAuthConfig: {
  issuer: 'https://api.merlinvoip.com',
  redirectUri: baseUrl,
  clientId: 'TestApp2_App',
  responseType: 'code',
  scope: 'offline_access TestApp2',
  requireHttps: true
},
apis: {
  default: {
    url: 'https://api.merlinvoip.com',
    rootNamespace: 'TestApp2',
  },
},
} as Environment;

In the database:

IdentityServerClientCorsOrigins table:
33764f2e-a4b3-ba64-06d1-39fef527bc9e	https://{0}.merlinvoip.com
2f3968f2-6d8f-70fc-b233-39fef527bd61	   https://api.merlinvoip.com
IdentityServerClientRedirectUris table:
33764f2e-a4b3-ba64-06d1-39fef527bc9e	https://{0}.merlinvoip.com
2f3968f2-6d8f-70fc-b233-39fef527bd61	   https://api.merlinvoip.com

When i go to the url https://merlinvoip.com and click login i get 500 server error.

The log shows :

2021-09-20 11:02:05.450 +00:00 [INF] Request starting HTTP/1.1 GET https://api.merlinvoip.com/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fresponse_type%3Dcode%26client_id%3DTestApp2_App%26state%3DV3AtQVRXLlFhYUtfLkdfdzFiRVQ2dzFqS3BKblpUMlV-TFNFc1p2d3YwTVcz%26redirect_uri%3Dhttps%253A%252F%252Fmerlinvoip.com%26scope%3Dopenid%2520offline_access%2520TestApp2%26code_challenge%3DzbaeuulWht0iscH43qvlt3Y0VRgkLQlcOwbnOH2wW9o%26code_challenge_method%3DS256%26nonce%3DV3AtQVRXLlFhYUtfLkdfdzFiRVQ2dzFqS3BKblpUMlV-TFNFc1p2d3YwTVcz%26culture%3Dtr%26ui-culture%3Dtr - -
2021-09-20 11:02:05.615 +00:00 [INF] Executing endpoint '/Account/Login'
2021-09-20 11:02:05.616 +00:00 [INF] Route matched with {page = "/Account/Login", action = "", controller = "", area = ""}. Executing page /Account/Login
2021-09-20 11:02:05.616 +00:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
2021-09-20 11:02:05.627 +00:00 [INF] Executed page /Account/Login in 10.8974ms
2021-09-20 11:02:05.627 +00:00 [INF] Executed endpoint '/Account/Login'
2021-09-20 11:02:05.718 +00:00 [ERR] An unhandled exception has occurred while executing the request.
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.Abp.Account.Web.Pages.Account.IdentityServerSupportedLoginModel -> Volo.Abp.Account.AccountAppService -> Volo.Abp.Account.Emailing.AccountEmailer -> Volo.Abp.UI.Navigation.Urls.AppUrlProvider.
 ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Microsoft.Extensions.Options.IOptions`1[Volo.Abp.UI.Navigation.Urls.AppUrlOptions], Volo.Abp.MultiTenancy.ICurrentTenant, Volo.Abp.MultiTenancy.ITenantStore)' on type 'AppUrlProvider'.
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at TestApp2.TestApp2HttpApiHostModule.&lt;&gt;c__DisplayClass2_0.&lt;ConfigureUrls&gt;b__0(AppUrlOptions options) in E:\abp\TestApp2\aspnet-core\src\TestApp2.HttpApi.Host\TestApp2HttpApiHostModule.cs:line 103
   at Microsoft.Extensions.Options.ConfigureNamedOptions`1.Configure(String name, TOptions options)
   at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
   at Microsoft.Extensions.Options.OptionsManager`1.<>c__DisplayClass5_0.<Get>b__0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
--- End of stack trace from previous location ---
   at System.Lazy`1.CreateValue()
   at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd(String name, Func`1 createOptions)
   at Microsoft.Extensions.Options.OptionsManager`1.Get(String name)
   at Microsoft.Extensions.Options.OptionsManager`1.get_Value()
   at lambda_method945(Closure , Object[] )
   at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   --- End of inner exception stack trace ---
   at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Reflection.ReflectionActivator.&lt;ConfigurePipeline&gt;b__11_0(ResolveRequestContext ctxt, Action`1 next)
   at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   at Autofac.Builder.RegistrationBuilder`3.&lt;&gt;c__DisplayClass41_0.&lt;PropertiesAutowired&gt;b__0(ResolveRequestContext ctxt, Action`1 next)
   at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   --- End of inner exception stack trace ---
   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.RegistrationPipelineInvokeMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.ScopeSelectionMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
   at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
   at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest request)
   at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
   at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
   at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Volo.Abp.AspNetCore.Mvc.UI.RazorPages.ServiceBasedPageModelActivatorProvider.&lt;&gt;c__DisplayClass0_0.&lt;CreateActivator&gt;b__0(PageContext context)
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageModelFactoryProvider.&lt;&gt;c__DisplayClass3_0.&lt;CreateModelFactory&gt;b__0(PageContext pageContext)
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.CreateInstance()
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextExceptionFilterAsync&gt;g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextResourceFilter()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeAsync&gt;g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.&lt;Invoke&gt;g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.&lt;&gt;c__DisplayClass6_1.&lt;&lt;UseMiddlewareInterface&gt;b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.&lt;&gt;c__DisplayClass6_1.&lt;&lt;UseMiddlewareInterface&gt;b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   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.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.&lt;&gt;c__DisplayClass6_1.&lt;&lt;UseMiddlewareInterface&gt;b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.&lt;&gt;c__DisplayClass6_1.&lt;&lt;UseMiddlewareInterface&gt;b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.&lt;&gt;c__DisplayClass6_1.&lt;&lt;UseMiddlewareInterface&gt;b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpJwtTokenMiddlewareExtension.&lt;&gt;c__DisplayClass0_0.&lt;&lt;UseJwtTokenMiddleware&gt;b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.&lt;Invoke&gt;g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

We tried countless variations of this setup to make it work but failed.

Thanks, Can Ercan

https://community.abp.io/articles/patch-for-chrome-login-issue-identityserver4-samesite-cookie-problem-weypwp3n

The solution is resolved by following this link.

Thanks. Problem solved.

I sent an email.

Waiting for reply.

Hi,

We tried with a demo project. We created the project from abp suite. Changed the appsettings.json values from https to http. HttpHost.Api runs without a problem. We changed environment values in the angular app from https to http. The requireHttps value is set to false.

import { Environment } from '@abp/ng.core';

const baseUrl = 'http://localhost:4200';

export const environment = { production: true, application: { baseUrl, name: 'HttpTest', }, oAuthConfig: { issuer: 'http://localhost:44378', redirectUri: baseUrl, clientId: 'HttpTest_App', responseType: 'code', scope: 'offline_access HttpTest', requireHttps: false }, apis: { default: { url: 'http://localhost:44378', rootNamespace: 'HttpTest', }, }, } as Environment;

But when we tried to login the app does not redirect http:\localhost:4200. It stays in the login page without any error message. When we manually go to http:\localhost:4200 the app is not logged in and there is an error in the console:

core.js:6456 ERROR Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'undefined'. Current value: 'false'.. Find more at https://angular.io/errors/NG0100 at throwErrorIfNoChangesMode (core.js:6757) at bindingUpdated (core.js:12967) at bindingUpdated2 (core.js:12981) at bindingUpdated4 (core.js:12992) at pureFunction4Internal (core.js:25711) at Module.ɵɵpureFunction4 (core.js:25498) at HeaderComponent_Template (volo-abp.ng.theme.lepton.js:1501) at executeTemplate (core.js:9579) at refreshView (core.js:9445) at refreshComponent (core.js:10616)

Thanks, Can Ercan

Answer

ABP Framework version: v4.3 UI type: Angular DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): no

When we replace the account module with the source code we get the errors below in the angular project.

Error: ./src/main.ts Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: Debug error: DtsModuleScopeResolver.read(AccountSettingsModule from E:/Development/abp/Version43/angular/projects/account/admin/src/account-settings.module.ts), but not a .d.ts file
at MetadataDtsModuleScopeResolver.resolve (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\dependency.js:52:23) at MetadataDtsModuleScopeResolver.resolve (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\dependency.js:100:46) at LocalModuleScopeRegistry.getExportedScope (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\local.js:529:51) at LocalModuleScopeRegistry.getScopeOfModuleReference (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\local.js:271:44) at LocalModuleScopeRegistry.getScopeOfModule (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\local.js:148:22) at LocalModuleScopeRegistry.getScopeForComponent (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\local.js:122:22) at ComponentDecoratorHandler.resolve (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\annotations\src\component.js:365:42) at TraitCompiler.resolve (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\transform\src\compilation.js:392:50) at NgCompiler.resolveCompilation (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\core\src\compiler.js:542:27) at NgCompiler.<anonymous> (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\core\src\compiler.js:423:34) at step (E:\Development\abp\Version43\angular\node_modules\tslib\tslib.js:143:27) at Object.next (E:\Development\abp\Version43\angular\node_modules\tslib\tslib.js:124:57) at fulfilled (E:\Development\abp\Version43\angular\node_modules\tslib\tslib.js:114:62) at process._tickCallback (internal/process/next_tick.js:68:7)

Error: ./src/polyfills.ts Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: Debug error: DtsModuleScopeResolver.read(AccountSettingsModule from E:/Development/abp/Version43/angular/projects/account/admin/src/account-settings.module.ts), but not a .d.ts file
at MetadataDtsModuleScopeResolver.resolve (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\dependency.js:52:23) at MetadataDtsModuleScopeResolver.resolve (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\dependency.js:100:46) at LocalModuleScopeRegistry.getExportedScope (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\local.js:529:51) at LocalModuleScopeRegistry.getScopeOfModuleReference (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\local.js:271:44) at LocalModuleScopeRegistry.getScopeOfModule (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\local.js:148:22) at LocalModuleScopeRegistry.getScopeForComponent (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\local.js:122:22) at ComponentDecoratorHandler.resolve (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\annotations\src\component.js:365:42) at TraitCompiler.resolve (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\transform\src\compilation.js:392:50) at NgCompiler.resolveCompilation (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\core\src\compiler.js:542:27) at NgCompiler.<anonymous> (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\core\src\compiler.js:423:34) at step (E:\Development\abp\Version43\angular\node_modules\tslib\tslib.js:143:27) at Object.next (E:\Development\abp\Version43\angular\node_modules\tslib\tslib.js:124:57) at fulfilled (E:\Development\abp\Version43\angular\node_modules\tslib\tslib.js:114:62) at process._tickCallback (internal/process/next_tick.js:68:7)

Error: (webpack)-dev-server/client?http://0.0.0.0:0&sockPath=/sockjs-node Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: Debug error: DtsModuleScopeResolver.read(AccountSettingsModule from E:/Development/abp/Version43/angular/projects/account/admin/src/account-settings.module.ts), but not a .d.ts file
at MetadataDtsModuleScopeResolver.resolve (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\dependency.js:52:23) at MetadataDtsModuleScopeResolver.resolve (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\dependency.js:100:46) at LocalModuleScopeRegistry.getExportedScope (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\local.js:529:51)39m at LocalModuleScopeRegistry.getScopeOfModuleReference (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\local.js:271:44) at LocalModuleScopeRegistry.getScopeOfModule (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\local.js:148:22) at LocalModuleScopeRegistry.getScopeForComponent (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\scope\src\local.js:122:22) at ComponentDecoratorHandler.resolve (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\annotations\src\component.js:365:42) at TraitCompiler.resolve (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\transform\src\compilation.js:392:50) at NgCompiler.resolveCompilation (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\core\src\compiler.js:542:27) at NgCompiler.<anonymous> (E:\Development\abp\Version43\angular\node_modules@angular\compiler-cli\src\ngtsc\core\src\compiler.js:423:34) at step (E:\Development\abp\Version43\angular\node_modules\tslib\tslib.js:143:27) at Object.next (E:\Development\abp\Version43\angular\node_modules\tslib\tslib.js:124:57) at fulfilled (E:\Development\abp\Version43\angular\node_modules\tslib\tslib.js:114:62) at process._tickCallback (internal/process/next_tick.js:68:7)

Showing 1 to 10 of 14 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11