Deployment issue

I get this error after deploying my app to Azure "HTTP Error 503. The service is unavailable".
I deployed using the FTP and Zip methods but it makes no difference.

Any idea what I might be doing wrong.

here's the site https://eo-radzen.azurewebsites.net/
and here's the error detail from Chrome
"favicon.ico:1 GET https://eo-radzen.azurewebsites.net/favicon.ico 503 (Service Unavailable)"

Hi @Dominic_Lallemant,

This error indicates a server-side problem which is not server error 500 (some exception). 503 is more serious - the server process probably failed to start altogether. I suggest to check Azure's logs. Also make sure .NET Core 2.2 or 3.1 is installed and IIS support enabled.

Thanks Korchev
I'm still struggling to deploy my application to Azure. Here's the output details if the IIS Deployment. I am happy to email you my publish profile as I would like to get this resolved as soon as possible.

dotnet: Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

dotnet: Restore completed in 48.31 ms for C:\Data\Radzen\EasyOrderAngularCSharp\server\project.csproj.

dotnet: project -> C:\Data\Radzen\EasyOrderAngularCSharp\server\bin\Release\netcoreapp3.1\server.dll

dotnet: project -> C:\Data\Radzen\EasyOrderAngularCSharp\server\bin\Release\netcoreapp3.1\server.Views.dll

dotnet: project -> C:\Data\Radzen\EasyOrderAngularCSharp\server\bin\Release\netcoreapp3.1\publish\

radzen: Server application prepare for publish done in 10376ms.
radzen: Building Angular application in production ...
ng-cli:
Date: 2020-02-18T09:13:43.259Z
Hash: e897fa57e0477b433c98
Time: 210234ms
chunk {0} runtime.26209474bfa8dc87a77c.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} es2015-polyfills.25c9f615a0dff27cb0f7.js (es2015-polyfills) 56.6 kB [initial] [rendered]
chunk {2} main.f01375f622b9f0b203f3.js (main) 6.62 MB [initial] [rendered]
chunk {3} polyfills.f0ca0b9ccd5a7ba93b23.js (polyfills) 153 kB [initial] [rendered]
chunk {4} styles.339701c580bfbeb811b6.css (styles) 162 kB [initial] [rendered]

ng-cli:
WARNING in ./node_modules/@angular/core/fesm5/core.js 18325:15-36

WARNING in ./node_modules/@angular/core/fesm5/core.js 18337:15-102

WARNING in budgets, maximum exceeded for initial. Budget 6 MB was exceeded by 1010 kB.

radzen: Angular application production build done in 216063ms.
radzen: Deploying...
radzen: Reading connection strings
radzen: Saving connection strings in appsettings.json
radzen: Creating temporary deploy folder
radzen: Copying client app to deploy folder
radzen: Copying server app to deploy folder
radzen: Syncing deploy folder with server
msdeploy: Error: Could not complete the request to remote agent URL 'http://eo-radzen.scm.azurewebsites.net:443/MSDEPLOYAGENTSERVICE'.
Error: The underlying connection was closed: An unexpected error occurred on a receive.
Error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Error: An existing connection was forcibly closed by the remote host

msdeploy: Error count: 1.

Are you trying to use IIS deploy with Azure? This probably won't work. We recommend either ZIP or FTP deploy to Azure. Some network configurations prevent FTP connections so ZIP is the better choice..

1 Like

The application looks fine. I was able to run it an it displayed the login screen successfully. Couldn't go beyond that as connecting to the database fails - my IP isn't allowed.

You can test deploy.zip easily:

  1. Unzip it somewhere
  2. Open command prompt and go to that directory
  3. Run dotnet server.dll

If everything is right you will see:

Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
Now listening on: https://localhost:5001

And you can open http://localhost:5000 in your browser.

The error you are getting is described in this issue. Probably .NET Core 3.1 is still not enabled in your Azure Web App. This post shows how to deal with that (check the Runtime options).

Has anyone been able to publish their Radzen project to Azure? I'm still working on this.

Yes, a lot of Radzen users deploy their applications to Azure. I still think that the problem you have is due to .NET Core 3.1 not being installed on your Azure instance. You can try creating a .NET Core 2.2 application in Radzen and see if deployment succeeds.

Most likely true. At present, I believe all Azure regions have 3.1 runtime, but only a few regions have the 3.1 SDK. This mean:

  1. you must add the 3.1 runtime extensions to your app service and

  2. manual deploy is only option

Here you can see the .Net Core support by region.
https://aspnetcoreon.azurewebsites.net

FWIW, Even though northcentralus shows both 3.1 runtime and SDK, my deploys don't work there.

The best thing to do for easy deploy is to make a 2.2 app in Radzen.

Deploy info: https://wakeupandcode.com/deploying-asp-net-core-3-1-to-azure-app-service/#runtime-options.

HTH,
Josh

1 Like

Typically, I find the easiest way to deploy to Azure is via github. That way I'm forced to enable source control in my RadZen project and once setup, I don't have to deploy via the portal. Below is a file with commands I use to do this from vscode terminal.

The short version, assuming you have your AppService all setup via the portal and deploy creds are set:

    curl -X POST -u <DeployUser> --data-binary @"deploy.zip" https://<AppName>.scm.azurewebsites.net/api/zipdeploy

This is a command line way to to do zip deploy. Basically the same as dragging deploy.zip to your site:
https://<AppName>.scm.azurewebsites.net/ZipDeployUI

HTH,
Josh

2 Likes

PS. I noticed improved Azure deploy is on RadZen short term roadmap. Please consider az cli and git techniques like above.

Thanks!

Awesome, thanks for your help.

I'm still having an issue with running my site.


This is what I get from the "Diagnose and solve problems" section when I click "Webapp Down"

It mentions the issue is with the "aspNetCore"

although I have installed all the .Net Core extensions available

Here's my site configuration

and this is how I deployed my site



Please note, I have selected "Central US Region" to make sure it would work with .Net Core 3.1
Is there any details that would be helpful for me to provide to get my site up and running, I would be very greatful.
Many Thanks for you help :slight_smile:

401 Access Denied is the error. So it’s an authentication problem. Maybe database credentials (?)
What do you see in the browser dev tools? You could try adding a blank home page with no data then publish and see if it loads.

1 Like

Hi Josh,
Thanks for your help.
What do you mean by "browser dev tools"

I mean open your site in the browser > F12 > refresh

Looks like you site is giving 401 Unauthorized and no other response bits are coming back.

It should look like this:

Looking at your VS screens shots, is this even a RadZen app? Looks like an MVC project.

1 Like

I'd try:
RadZen > Deploy > ZIP (this creates Deploy.zip file in your project dir)
Then open this in the browser:
https://radzen1.scm.azurewebsites.net/ZipDeployUI
then simply drag the resulting Deploy.zip file and drop onto the page
done

You may have to start with a new Azure App.
HTH,
Josh

1 Like

It worked!!! finally, thanks a lot for your time Josh. much appreciated

I created a new site, and deployed the zip file. The key was to create a new site. Thanks again

1 Like

@Dominic_Lallemant FWIW I've mentioned the deploy to ZIP option in my second reply.

Yes, you have, thank you :slight_smile: but I think I could not get it to work because I had tried to deploy my site using other methods and I had never thought to create a new site first.