Open Closed

Why Service API respone localhost:4200 #1355


User avatar
0
thaithiendi created

Dear support team,

I host Angular into IIS: https://dmsuat.hanwhalife.com.vn:501/HLVDMS/ When i click Login, redirect to service like this But when i login website redirect to localhost:4200 I have update appsettings.json like this I don't understand why service redirect to localhost:4200 Please show me how to fix it

  • ABP Framework version: v4.2.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

7 Answer(s)
  • User Avatar
    0
    bunyamin created

    Hello,

    Could you please share your environment.ts and environment.prod.ts files omitting confidential information?

  • User Avatar
    0
    thaithiendi created

    Hello,

    Could you please share your environment.ts and environment.prod.ts files omitting confidential information?

    Hi bunyamin

    There are my environment files And My Logs folders of service api

  • User Avatar
    0
    bunyamin created

    Could you please check the table IdentityServerClientRedirectUris in your prod database?

    Also, I've noticed that your environment.ts looks like your environment.prod.ts. environment.ts is used when running your application with ng serve. environment.prod.ts is used when you run ng build --prod. Having the same entries for both could cause some confusion.

  • User Avatar
    0
    thaithiendi created

    Could you please check the table IdentityServerClientRedirectUris in your prod database?

    Also, I've noticed that your environment.ts looks like your environment.prod.ts. environment.ts is used when running your application with ng serve. environment.prod.ts is used when you run ng build --prod. Having the same entries for both could cause some confusion.

    Thanks bunyamin,

    I updated database and i have a new error when login. Please show me how to fix it

  • User Avatar
    0
    bunyamin created

    It seems that you encountered a CORS error. Please check the IdentityServerClientCorsOrigins table and make sure that dmsaut.hanwhalife.com.vn:501 is within allowed CORS origins.

  • User Avatar
    0
    thaithiendi created

    It seems that you encountered a CORS error. Please check the IdentityServerClientCorsOrigins table and make sure that dmsaut.hanwhalife.com.vn:501 is within allowed CORS origins.

    Dear bunyamin,

    Thanks you for your answer quickly. I have already update IdentityServerClientCorsOrigins table but the error still in here

    Where else can i check?

  • User Avatar
    0
    thaithiendi created

    Thanks bunyamin, I wrong config in appsetting.json in API project, It's ok when I remove /HLVDMS/

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11