Open Closed

Angular Project Not Loading With Gateway #5618


User avatar
0
alicaner created
  • ABP Framework version: 7.0.1
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): auth server seperetad for angular
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

According to the structure above, when a request is made to the auth server from the angular project on port 7600, and when a request is made to other services on port 5501 api gateway(ocelot), we cannot reach any page in the angular project. What do you think could be the reason?


14 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi

    do you get this after login, can you share the steps to reproduce so we can reproduce this issue on our side? can you check result of endpoint /application-configuration and share the screenshot.

  • User Avatar
    0
    alicaner created

    /application-configuration

    We can't reach the login screen and any screens. The login page does not appear. but we can get a response when " /application-configuration" request is sent to this address

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    The login process does not use the gateway. AuthServer directly uses the IdentityService database to check the credentials for client authentication and the user authentication afterwards.

    Since this is a custom solution, I'll try to check it remotely.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi,

    can you share screenshot of below file code app.component.ts app-routing.routing.ts home.component.ts home.component.html. I think you are not trying to authenticate which should be done by this this.authService.navigateToLogin();

    you can also share your project to support@abp.io with ticket id so we can check

  • User Avatar
    0
    alicaner created

    Hello, I sent the project to your e-mail address. We look forward to your support,

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello alicaner ,

    Just received your mail , we will check and get back to you asap.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi,

    There are some missing configuration related to languages and application is not able to determine the default resource type. I would suggest create a non-commercial backend app you can do that with below cli :

    abp new Acme.BookStore -u none -csf --version 7.0.2

    and follow the code structure and configuration done there so you don't miss in with any default abp code.

    Following are the changes done to you application to get this working.

    change in enviornment.ts

    change in AdministrationServiceDomainModule

    public override void ConfigureServices(ServiceConfigurationContext context) { Configure<AbpLocalizationOptions>(options => { options.Languages.Add(new LanguageInfo("ar", "ar", "العربية", "ae")); options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English", "gb")); options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish", "fi")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français", "fr")); options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi", "in")); options.Languages.Add(new LanguageInfo("it", "it", "Italiano", "it")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский", "ru")); options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak", "sk")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe", "tr")); options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch", "de")); options.Languages.Add(new LanguageInfo("es", "es", "Español")); }); base.ConfigureServices(context); }

    Change in AdministrationServiceDomainSharedModule

    add below line options.DefaultResourceType = typeof(AdministrationServiceResource);

    change in AdministrationServiceHttpApiHostModule Configure<AbpLocalizationOptions>(options => { //BootstrapDatepicker options.AddLanguagesMapOrUpdate(BootstrapDatepickerScriptContributor.PackageName, new NameValue("zh-Hans", "zh-CN"), new NameValue("zh-Hant", "zh-TW")); options.AddLanguageFilesMapOrUpdate(BootstrapDatepickerScriptContributor.PackageName, new NameValue("zh-Hans", "zh-CN"), new NameValue("zh-Hant", "zh-TW")); //moment options.AddLanguagesMapOrUpdate(MomentScriptContributor.PackageName, new NameValue("zh-Hans", "zh-CN"), new NameValue("zh-Hant", "zh-TW")); options.AddLanguageFilesMapOrUpdate(MomentScriptContributor.PackageName, new NameValue("zh-Hans", "zh-CN"), new NameValue("zh-Hant", "zh-TW")); //Timeago options.AddLanguageFilesMapOrUpdate(TimeagoScriptContributor.PackageName, new NameValue("zh-Hans", "zh-CN"), new NameValue("zh-Hant", "zh-TW")); //JQueryValidation options.AddLanguageFilesMapOrUpdate(JQueryValidationScriptContributor.PackageName, new NameValue("zh-Hans", "zh"), new NameValue("zh-Hant", "zh_TW")); });

    let me know if you have any problem after following these steps

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi,

    Also you are missing this in ocelot.json

  • User Avatar
    0
    alicaner created

    Hi,

    Also you are missing this in ocelot.json

    Hi, After logging in, we get a 403 error when trying to do identity management, this is not valid for the tenant, but it is valid for other features. When we look at the grant policies, we can see the authority, but we cannot take action.

  • User Avatar
    0
    alicaner created

    Hi,

    Also you are missing this in ocelot.json

    Hi, After logging in, we get a 403 error when trying to do identity management, this is not valid for the tenant, but it is valid for other features. When we look at the grant policies, we can see the authority, but we cannot take action.

    Hi, We have solved the identity management problem, the page is loading, but we are getting a 401 error while loading the admin/myaccount page, do you have any suggestions for this?

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi,

    we will check and let you know asap.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi,

    it seems you have missing configuration and wrong audience specified in authserver module

    please make following changes.

    Make changes while adding authentication in serenderAuthServerModule

    Also there is no configuration added in appsetting for configuration["AuthServer:Authority"]; in serenderAuthServerModule

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello alicaner,

    Please do let us know if this solution has worked for you?

    Can we close this ticket if your query is resolved? Please confirm.

    Awaiting for your valuable response.

    Thank You, Anjali

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello alicaner,

    Hope you are doing well.

    Please do let us know if the above shared solution has worked for you?

    Can we close this ticket if your query is resolved? Please confirm.

    Awaiting for your valuable response.

    Thank You, Anjali

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15