Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy .net core 3.0 on AZURE or Local

Over the last 2 days i twisted my head around deploying my WEB API.

App specification: WEB API .NET CORE 3.0 Preview 4

Firstly i tried to deploy on Azure using App Services. Seems like they don't support .net core 3.0 but i don't really understand this since you can wrap everything in your package, wasn't this done in order to be deploy-able everywhere ? When i'm trying to access the websitei get a HTTP Error 500.0 - ANCM In-Process Handler Load Failure which i didn't managed to fix.

--I tried to do the same with a clean project, still same issue--

Secondly i created a virtual machine (VM) and deploy on VM.

Here i get a internal server error and i cannot debug (any tips are welcome)

Third I deployed on local IIS, here i get the following error: "Cannot read configuration file due to insufficient permissions"

I added the permissions to IIS_IUSRS but after this i get a infinite loop

--The same i get with the clean project--

Am i doing something wrong , what could i do to deploy my Web Api Project.

like image 508
ATudor Avatar asked Apr 21 '19 16:04

ATudor


People also ask

Where do I deploy .NET Core?

In general, to deploy an ASP.NET Core app to a hosting environment: Deploy the published app to a folder on the hosting server. Set up a process manager that starts the app when requests arrive and restarts the app after it crashes or the server reboots.

Can ASP NET be deployed with Azure?

ASP.NET web apps are cross-platform and can be hosted on Linux or Windows. When you're finished, you'll have an Azure resource group consisting of an App Service hosting plan and an App Service with a deployed web application.


1 Answers

The documentation suggests that it is possible to deploy preview versions, although I haven't tried it. This blogger encountered the same problem you did, and resolved it using these instructions. He says:

This document covers two different ways to fix this issue – you can either install the preview site extensions for ASP.NET Core 3, or you can simply change your deployment to be a self-contained application. In this case we’re going to go with deploying a self-contained application, since this reduces any external dependencies which seems sensible to me.

So it seems you are correct that building a self-contained package is one way of solving this, but you have to specifically ask for that when you publish.

like image 137
Tom W Avatar answered Oct 03 '22 04:10

Tom W