Open Closed

Login page not loading #7566


0
aiz created

Login page.png

Browser console shows that GET https://api.alservices.com/AbpUserConfiguration/GetAll?d=1567102056688 call fails with net::ERR_FAILED

network tab

Network tab.png

Network tab.png

Environment

ASP.NET Core Angular v7.1.0 .Net Core 2.2 Windows 10 Chrome Version 76.0.3809.100 (Official Build) (64-bit) Node v10.15.0 IIS 10.0.17134.1

Host appsettings.json

"App": {
    "ServerRootAddress": "https://api.alservices.com/",
    "ClientRootAddress": "http://{TENANCY_NAME}.alservices.com:81/",
    "CorsOrigins":http://alservices.com:81,http://localhost:49152,
                    http://*.alservices.com:81",
    "SwaggerEndPoint": "/swagger/v1/swagger.json",
    "AllowAnonymousSignalRConnection": "true"
  },

Observations

No errors are present in host log files, AbpUserConfiguration/GetAll executes successfully.

Question

  1. Why are we getting a "net::ERR_FAILED" error in Chrome?
  2. Why are pages not loading?

12 Answer(s)
  • 0
    maliming created

    Please share your CORS configuration as shown below.

    image.png

  • 0
    aiz created
    //Configure CORS for angular2 UI
                services.AddCors(options =>
                {
                    options.AddPolicy(DefaultCorsPolicyName, builder =>
                    {
                        //App:CorsOrigins in appsettings.json can contain more than one address with splitted by comma.
                        builder
                            .WithOrigins(
                                // App:CorsOrigins in appsettings.json can contain more than one address separated by comma.
                                _appConfiguration["App:CorsOrigins"]
                                    .Split(",", StringSplitOptions.RemoveEmptyEntries)
                                    .Select(o => o.RemovePostFix("/"))
                                    .ToArray()
                            )
                            .SetIsOriginAllowedToAllowWildcardSubdomains()
                            .AllowAnyHeader()
                            .AllowAnyMethod()
                            .AllowCredentials();
                    });
                });
    
  • 0
    maliming created

    @oriassurant

    Can I take a look at it remotely? Please send teamviewer information to liming.ma@volosoft.com

  • 0
    aiz created

    @maliming

    Please let me know when you are available for a session

  • 0
    maliming created

    We can remote now.

  • 0
    aiz created

    Hello, Please join the video call, by clicking on this link: https://go.teamviewer.com/v14/m86284895 Meeting ID: m86-284-895

  • 0
    maliming created

    Please share your ID and password by email image.png

  • 0
    ismcagdas created

    Hi @oriassurant

    Have you checked server-side log file ? Most of the time, CORS issues on Angular app are misleading. So, this might be something related to a server side error.

  • 0
    maliming created

    @ismcagdas Found the problem remotely. @oriassurant is working on it.

  • 1
    drenton created

    I created the same issue before and the issue seems to be from Chrome.

    https://support.aspnetzero.com/QA/Questions/7529

  • 0
    aiz created

    Why was this closed?

  • 0
    maliming created

    @oriassurant

    Have you solved the problem yet? I remember that the web application responded slowly because of computer performance.