0

Please or Register to create posts and topics.

Deploying web app on Azure

Page 1 of 2Next

Hello.

Is it possible to have a guide to deploy the QuickApp Pro to Azure please  ? Then I don't know how to switch from local db connection to cloud db connection in order to deploy to Azure . Ultimately I don't know how to treat the  DAL project during publishing on Azure. Is DAL project automatically deployed publishing QuickAPPPro projecyt ?

 

Best Regards,

 

Marco Semenzato

Hi,

 

I got the free edition deployed to azure without any further problem. BUT I did not get the payed pro version up and running. See my other post here in the forum. There are open issues with token based authentication. Unfortunately there is no reply until today. This version is useless in azure.

Is there a guide on deploying the quick app to azure web apps?  The quick app uses both nodejs and .net core, but when creating a web app in azure I'm forced to choose one or the other.  Please help.

 

 

mmm I have had no (real) issues with azure deployment, once I worked out the following 'magic' (look a few evenings!!) - all three version are working for me (free, std,pro of the latest Ang8 version and I've been deploying the previous version to azure for about 12 months).

There are the steps:

1 - Created a Azure DB - add a empty Database (eg QuickAppPro) and note the connection string in the setup of the DB. It will be something like:

"DefaultConnection": "Server=tcp:ekardt.database.windows.net,1433;Database=QuickAppProAng8;Persist Security Info=False;User ID=<<your user name>>;Password=<<Your Password>>;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"

2 - Connect locally via the MS Sql Server Studio - make sure you can connect (open the firewall etc)

3 - Add this connection as the appsettings.Development.json to replace the local connection.

4 - Run the app (it may time-out the first time, but F5 refresh, and you should get to the login).

5 - Login as admin (password in readme) and if good your DB is good to go (maybe add a user too to ensure that's good).

6 - Created an azure  'Web App Service ' using the wizard, most of the defaults are good, select .net core 2.2 as runtime.. (although this doesn't appear to work - see step 7).

7 - Go to the service, and in the 'extention' option, asp.net core 2.2 (x64), save and ensure in the service (sometimes azure doesn't seem to save it).

8 - Add the connection string to 'settings->configuration' - under connection strings (DefaultConnection, string and SQL Azure)

9 - Download the the deployment profile to your PC (on menu of service).

10 - update appsettings.json:

{
//Note: In Production change this to your actual host (e.g. https://quickapp.ebenmonney.com)
"ApplicationUrl": "https://web_app_name_your_created_in_azure.azurewebsites.net",
"HttpsRedirectionPort": 443, //Set this to enable https redirection

11 - deploy to azure from visual studio, importing the deployment profile, the defaults work.

This has been working for me for 12 months, I had a memery error in the angular (answered in another question), and in the current pro for ang8 there is a minor bug which stops deployment too, but I downloaded the Pro and Std and got this all going in a few hours today.

If anything is not clear, let me know. I love this template - others are way too complex, or the UI is not suited to my needs, but I have 3 products (1 using material, 2 using the std UI)

Good luck.

Ingo, Eben Monney and dhodges351 have reacted to this post.
IngoEben Monneydhodges351

@tony,

Are you modifying any of the Azure configuration?  I keep getting the "HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure" error.  I can modify the physical path configuration to point to the ..\clientapp\dist folder, and I can bring up the login page.  However, it fails when trying to use the authentication service (\connect\token).

Any ideas?

@b_neagle,

I was running into this for the past 3 days and finally just got it to run.  Here are a few things to check:

  1. Update appsettings.json with the following:
    1. DefaultConnection: this should be your database as @tony stated
    2. ApplicationUrl: this should be your Azure web app url.
    3. https_port: I update this to be a numeric value of 443 since I believe Azure apps only allow 80 & 443
  2. If your database is already created and seeded (initial migration run), then comment out this line in Program.cs:
    1. databaseInitializer.SeedAsync().Wait();
    2. For me, this was line 35...I ran my migrations locally first for my staging database then deployed, and this gave a different error, but was worth mentioning I thought.
  3. Deploy from Visual Studio using the publish profile as follows:
    1. Target Framework: netcoreapp3.0
    2. Deployment Mode: Self-Contained
    3. Target Runtime: win-x86
    4. Under "Site Extension Options" check "Install ASP.NET Core Site Extension"
  4. Once the app is deployed, make sure that the ASPNETCORE_ENVIRONMENT environment variable is NOT "Development" (if you have access to the azure portal, you can get to this via the app service editor).  If you don't have access to this, then you'll need to create a new configuration when deploying from Visual Studio.

Hopefully that works for you!  I had also modified the Startup.cs and ended up reverting all of my changes for now back to default and that helped too.

Ingo has reacted to this post.
Ingo

@joseph-koppin,

Thanks for the follow-up; these are great notes.  However, it was my own fault this time.  I did not reset the database connection like the instructions stated.  The only other issue I encountered (for those of you that are following this thread) was that some static files will have to be moved manually.  For example, I created some additional template files, but called them "xxx.template.html" instead of "xxx.template" which were ignored in the publish routine.  Other than that this thread worked like a charm.  Thanks everyone!

-Billy

I have been trying for the past three days to deploy and nothing is working for me... I keep on getting the error below:

An unhandled exception occurred while processing the request.

AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: npm ERR! Error: ENOENT, open 'D:\home\site\wwwroot\ClientApp\node_modules\start\package.json'
I followed your suggestions to the T but no Luck can you please help. What am I doing wrong?
Eugene Gavriloff has reacted to this post.
Eugene Gavriloff

Same error in free version of the QuickApp when deployed to Azure WebApp (Windows)

An unhandled exception occurred while processing the request.

AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: npm ERR! Error: ENOENT, open 'D:\home\site\wwwroot\ClientApp\node_modules\start\package.json'

npm ERR! { [Error: ENOENT, open 'D:\home\site\wwwroot\ClientApp\node_modules\start\package.json']

npm ERR! errno: 34,

npm ERR! code: 'ENOENT',

npm ERR! path: 'D:\\home\\site\\wwwroot\\ClientApp\\node_modules\\start\\package.json' }

npm ERR! You may report this log at:

npm ERR! <http://github.com/isaacs/npm/issues&gt;

npm ERR! or email it to:

npm ERR! <npm-@googlegroups.com>

@eugene_gavriloff.  I also encountered the problem you describe in the previous post. I was able to fix by doing the following

Problem: The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: npm ERR! Error: ENOENT, open 'D:\home\site\wwwroot\ClientApp\node_modules\start\package.json'

Solution: In the file "\ClientApp\angular.json" change the outputPath setting to "dist".  Where dist is equal to where the angular files are deployed in azure.  In my azure app service it was "D:\home\site\wwwroot\ClientApp\dist".  You can view this by going to Deployment Tools -> Advanced Tools -> Go -> Debug Console -> CMD in the azure app service.

Page 1 of 2Next