Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "BobIngham"

Following a release of 6.8.0 to Azure I appear to have lost the username in the header bar. It's there, as you can see from the image below when I highlight the text: The problem does not exist when I run the project locally.

Any ideas anyone?

It's the default theme.

angular, dotnetcore, 6.8.0, .net 4.6.1 After a problematical release, the problems all of my own making, I am getting two annoying errors in the console. The deplyment is to Azure, the errors do not appear when I run the solution locally.

Error: Failed to start the connection: Error: Unable to initialize any of the available transports.

Any pointers gratefully received. I have searched the angular project but cannot find any reference to these two errors. I believe it's a SignalR issue but, as the image shows, connection is eventually made.

I really must learn to upgrade more often and pay careful attention to the release notes. Thanks again, Aaron.

Bingo!!!! Thanks, Aaron. Nice to have someone holding my hand.

I'm googling, seems there have been some changes since Core 2.2. I'm about to try

.SetIsOriginAllowed((host) => true)

https://stackoverflow.com/questions/54091699/aspnetcore-2-2-api-cors-policy

Ooooops, spoke too soon. I also have Ionic apps connecting to the server. I never had a problem with these before, I'm told there should be no problem with CORS for apps. Any ideas?

LIFESAVER!!!!!! Thanks Aaron. Time for a coffee, thanks.

I am also unable to impersonate logins:

Access to XMLHttpRequest at 'https://westfield.nuagecare.io/api/TokenAuth/ImpersonatedAuthenticate?impersonationToken=...' from origin 'https://westfield.nuagecare.net' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

BIG BIG PROBLEM, PLEASE HELP

I am getting the following error following deployment to Azure:

Access to XMLHttpRequest at 'https://nuagecare.io/signalr/negotiate?enc_auth_token=... from origin 'https://nuagecare.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Here is my appconfig.production.json for the angular project (note - previous posting on having to rename this file):

{
  "remoteServiceBaseUrl": "https://{TENANCY_NAME}.nuagecare.io",
  "appBaseUrl": "https://{TENANCY_NAME}.nuagecare.net",
  "localeMappings": [
    {
      "from": "pt-BR",
      "to": "pt"
    },
    {
      "from": "zh-CN",
      "to": "zh"
    }
  ]
}

Here is the relvant section for my appsettings.production.json for the dotnetcore project:

    "App": {
        "ServerRootAddress": "https://{TENANCY_NAME}.nuagecare.io/",
        "ClientRootAddress": "https://{TENANCY_NAME}.nuagecare.net/",
        "CorsOrigins": "https://{TENANCY_NAME}.nuagecare.net/,https://nuagecare.net/,https://jsonip.com/"
    },

Here is my Startup.cs CORS section:

            //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();
                });
            });

Here are my custom domains on Azure for the angular UI and the dotnetcore API: and

I am at my wits end - is there anything I am missing?

If I stay with appconfig.json I get:

ERROR SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
Showing 331 to 340 of 619 entries