Base solution for your next web application

Activities of "henryand"

we are using ANZ 10.1 Angular/Core combined

I have adapted our multi-tenant production environment to use the tenancy placeholder "ServerRootAddress": "{TENANCY_NAME}.domain.com/", "ClientRootAddress": "{TENANCY_NAME}.domain.com/", "CorsOrigins": "{TENANCY_NAME}.domain.com/", on our domain provider, i created a CNAME entry for each tenant. this is working to autoselect the tenantId for our production environment.

i would now like to apply this to our other environments. for example: "ServerRootAddress": "{TENANCY_NAME}.qa.domain.com/", "ClientRootAddress": "{TENANCY_NAME}.qa.domain.com/", "CorsOrigins": "{TENANCY_NAME}.qa.domain.com/",

I think my problem is in the domain definition for sub-sub-domain. Any suggestions on getting the url to actually get to the site?

Question

we use ANZ 10.1 Angular/Core combined

Our application is multi-tenant with separate databases and a host db. I am in the process of setting up a CICD pipeline in Azure DevOps to build and publish our site when a merge request has been completed. This gets the hosted app up to date but migrations still need to be run on the database.

with the app publish automated, the database update also needs to be automated. what is the recommended process for running EF migrations in a CICD flow?

Thanks, Rocco

we are using ANZ 10.1 Angular/Core combined

When i publish, i need to go into Filezilla to delete the angular appconfig.json and replace it with the appropriate appconfig.environment.json otherwise it still tries touse localhost on our published sites instead of our hosted domain

i have set the ASPNETCORE_ENVIRONMENT for each environment. i thought that was supposed to be sufficient for Angular to look at the correct json file

What is the correct process for having Angular get the correct remoteServiceBaseUrl and appBaseUrl for the deployment slot?

thanks, Rocco

we found our solution. i'm posting it here for anyone that may read this thread.

Since azure expects the angular app to be in WWWROOT instead of WWWROOT/DIST, we can build it in wwwroot/ but only if angular knows not to delete the existing contents.

        "outputPath": "wwwroot/",
        "deleteOutputPath": false,

that automates the process, but does not remove the time to copy all of the files. it seems the files can't be generated in the place where they are expected to be used (./wwwroot/) so i was asking if we could use them where they are generated (./wwwroot/dist/). it seems very odd to me that we publish both the api and the angular to the webserver at the same time but only the api will run after publish. the entire angular app needs to be moved twice - to the correct folder and to azure.

is there a way to define the angular app's root folder as the dist folder?

we are running anz10 angular .net5 combined

i have been doing webdeploy from visual studio to Azure deployment slot, then moving all of the files from wwwroot/wwwroot/dist/ to wwwroot/wwwroot using filezilla after every deploy. this has been very time consuming. I have tried changing the angular.json outputPath to wwwroot, but that causes errors when trying to publish because several files are then missing. i can change it to any folder name below wwwroot, but not to the actual wwwroot that Azure expects to find the app.

Can the angular project be setup to run from inside the dist folder so that the files don't need to be moved up one folder?

thanks, Red Cedar

Could you provide a follow-up here? We also have "Response already started" littering our log files.

the error message references the following line in Startup.cs

app.Use(async (context, next) => { await next(); if (context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value)) { context.Request.Path = "/index.html"; await next(); } });

are there any examples or documentation for having a separate seeders per tenant?

we do have a standard schema across all tenants, but the data is tenant specific. we need a methodology for updating the data in each tenant database when running the backend before the frontend brings up the login screen. that seems like it would be in the seedhelper. I don't want the seedhelper to run against the default host db, it needs to run against the tenant dbs. when my devs are running localhost to their 3 databases (host, tenant1, tenant2) we would want a seedhelper1 to run against tenant1 connectionstring and then run seedhelper2 against tenant2 connectionstring.

Running ANZ10 Angular/Core

we are adding a new tenant to our system. we have a host database and a db for each tenant.
we are using migrations for Code First EF and SeedHelper to maintain some stock metadata.

since the tenants have different data, a migration written for one db won't necessarily be right for another.
is it possible to use migrations for tenant specific db data updates?
a) can a migration be run only for one tenant? b) how does anz support separate databases per tenant with the db snapshot?

-Rocco-

We are are using ANZ 10.1 Angular/Core combined version deployed to an Azure app service deployment slot.

When we publish changes to the Angular front-end, we occasionally have users stuck in a spinning wheel. Debugging has determined that their front end code was cached for their browser. Having them clear their browser history resolved the issue. Our customer should not have to deal with our application hung up by their users' browser cache. Is there a way to set our ANZ Angular code to not cache the html and ts files?

Thanks, Rocco

Showing 11 to 20 of 38 entries