BINGO! Thank you so much! I'd correctly set up all the values except for WebSiteRootAddress
"ServerRootAddress": "https://{TENANCY_NAME}.xxx.cloud/", "ClientRootAddress": "https://{TENANCY_NAME}.xxx.cloud/", "CorsOrigins": "https://{TENANCY_NAME}.xxx.cloud/", "WebSiteRootAddress": THIS WAS INCORRECT!
Now it's working, is there a simple way of showing the Clients logo on the login screen by using the Tenancy name? i.e. Is it possible to use the TENANCY_NAME to find a matching image that uses the Tenancy name such as {TENANCY_NAME}.jpg
HI @ismcagdas
I've been trying it with and without the https:// prefix and I've added it to appsettings and appsettings.production.json.
Nothing seems to work which is why I was asking if anyone had managed to make it work with Azure Web Apps as I was beginning to think there might be a specific issue with Web apps.
Any suggestions of how what to try next would be appreciated.
Version 11.3- MVC- Net.Core Multi-tenant
I've successfully purchased a wildcard domain and have configured it with Azure.
I have followed the ASPNetZero documentation and made the changes to the appsettings.json so allow for the subdomain to select the tenant.
"ServerRootAddress": "{TENANCY_NAME}.mydomain.com/",
"ClientRootAddress": "{TENANCY_NAME}.mydomain.com/",
"CorsOrigins": "{TENANCY_NAME}.mydomain.com/"
(Obviously I'm not using mydomain.com in my app!)
However, when I Publish ASPNETZERO to Azure and use my subdomain, it is just ignored and the Tenant selector is always shown.
I've now spent many days trying different approaches but I've run out of ideas to get this working.
So, has anyone managed to use sub domains on an Azure Web App to successfully select the tenant as I'm beginning to wonder if Azure is causing an issue, and if there's a workaround?
Is there a simple way of retrieving the current Tenant name either directly into a View or Controller?
(MVC DotNet Core)
Please delete (created in error)
I first updated to 3,5,1 and tested. All was ok. I've now updated to 3.6.0 and that seems fine too.
Many thanks for your help.
We've just run a Security check on ANZ 10.5 and it has failed due to the version of jQuery being 3.4.1. The exact description was "jQuery v3.4.1 contains multiple known cross-site scripting vulnerabilities. All versions prior to 3.5.0 are vulnerable."
Without wishing to make too many changes to ANZ, what is the correct way to update the version of jQuery that ANZ uses?
When logging in everything seems to be working for 2FA. I can specify Email, Phone or Google Authenticator and all works as expected.
However, after checking the "Remember me" box, I was expecting not to be asked again for 2FA details as I was logging in on the same browser and PC.
I've now tried this 5 times and I always get asked for 2FA details each time regardless of whether the "Remember me" box is checked or not.
Is there an issue or have I misunderstood something?
@samara081 Thanks for the tip.
My point was that the Getting Started Guide just says to use "update-database" which is now incorrect as it no longer works with HeathChecksEnabled by default.
Hi @musa.demir
I hadn't enabled Health Checks myself, it seems they are Enabled by default in the appsettings.json file.
"HealthChecks": { "HealthChecksEnabled": true, "HealthChecksUI": { "HealthChecksUIEnabled": true, "HealthChecks": [ { "Name": "xxxxxxx.Web.MVC", "Uri": "https://localhost:44302/health" } ], "EvaluationTimeOnSeconds": 10, "MinimumSecondsBetweenFailureNotifications": 60 } },
As an experiment, I tried setting "HealthchecksEnabled" to false and as a result the issue with "More than one DbContext found" went away. So the issue is resolved as long as the HealthChecks are not Enabled.