Azure App Service and dotnet 64 bit

dotnetcore
web

#1

I have a SAFE app and I am trying to install the server (Giraffe) on Azure App Service but I have not been able to do that because the VM only has 32 bit dotnet installed. I have not figured out how to install the 64 bit version of dotnet core on it. I have wasted more than half a day trying to find out how to install 64 bit version of dotnet core. This is really bad as I would have expected MS to have 64 bit versions of dotnet core pre-installed on these VMs and if not they would have made it easier to install it.

Can anyone help me installing 64 bit dotnet core on Azure App Service so that I can deploy my app?


#2

Hi @sandeepc24

Have you take a look on this similar case?
here and here or here?


#3

Hi

I deployed safe app on Azure without the VM. I used 1) the app service that runs on the .net runtime (https://safe-stack.github.io/docs/template-appservice/) and then I did it using 2) docker https://safe-stack.github.io/docs/template-docker/


#4

Hi sashang

Is the Azure App Service VM using 64 bit dotnet or 32 bit?


#5

I’m using Linux. There’s no 32bit .net core runtime for LInux. It’s all 64bit. For example this is the output from a linux based web app

root@11adaf6a29ad:/home# uname -a

Linux 11adaf6a29ad 4.4.0-128-generic #154-Ubuntu SMP Fri May 25 14:15:18 UTC 2018 x86_64 GNU/Linux

root@11adaf6a29ad:/home# dotinfo

-bash: dotinfo: command not found

root@11adaf6a29ad:/home# dotnet --info

Host (useful for support):

Version: 2.1.2

Commit: 811c3ce6c0

.NET Core SDKs installed:

No SDKs were found.

.NET Core runtimes installed:

Microsoft.AspNetCore.All 2.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]

Microsoft.AspNetCore.App 2.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]

Microsoft.NETCore.App 2.1.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:

https://aka.ms/dotnet-download

root@11adaf6a29ad:/home#

You can see that it is 64bit (x86_64). So what I think you can do is create a web app based on Linux as the core OS instead of Windows. Assuming you’re developing on .net core this should work.


#6

I deployed the SAFE app using https://safe-stack.github.io/docs/template-appservice/ but it is still using win10-x86 and not 64 bit version of dotnet. I am not sure how to deploy to linux using this method.


#7

I am using SAFE Bookstore template and it is setup to be deployed using docker only. Has anyone managed to deploy this on Linux App Service?


#8

Not the Bookstore app, but I’ve deployed my own app. I remmeber when I went through it, the instructions are a bit broken. They don’t work 100%. I had to do some fiddling to get things to work and I think MS have changed the layout in the portal so the screenshots from here https://safe-stack.github.io/docs/template-docker/ don’t match up with what you have to click on the azure portal.


#9

This is how I deployed a docker image.

fake build --target Bundle
fake build --target Docker

Test with docker locally

docker run --rm -it -net=host  sashang/titan

If it’s ok then push to dockerhub

docker push sashang/titan

The login to Azure and create a Web App. Under OS select Linux, under Publish select Docker image
Then click configure container and setup the path to dockerhub where azure will fetch the container

Then click Create


#10

Thanks sashang, deployment to docker worked.


#11

I now have another issue where the dotnet core app running in docker is not picking up the Environment variable. This is where I have stored my Postgres connection string. It works fine on Azure functions.