ASP NET Core 5.0 not supported in Azure

Viewed 906

Hello i have a ASP Net Core 5.0 web api which i am trying to deploy to azure and i can't because it says it is not yet supported.
However following the MSDN and similar threads ( when the same issue was valid for .NET Core 3.1) i understood that you can publish it with the option to be self-contained. It still does not work:

Application Logs

enter image description here

VStudio Publish enter image description here Any idea on how to publish my application to azure ?

Later Edit I forgot to mention all calls to my web api return a 404 message.

So if my [indexurl] returns the microsoft page [Indexurl]/[some path] returns 404 (which i understood from github is a 500 actually)

What should i understand ? The web api works , or it doesnt and where could the problem be ?

1 Answers

ASP NET Core 5.0 not supported in Azure

After testing, azure webapp currently supports ASP.NET Core 5.0.

According to your description, I conducted a test, first tested under windows, it was normal. Then deployed and tested under Linux, it is normal.

I guess the reasons may be the following two:

  1. There is a problem with your .Net 5.0 installation. It may be used when compiling, if necessary, and cause compilation exception and release failure. (The possibility is relatively low)

  2. It is possible that the webapi created by default does not have a default index page, so you feel that it is not supported. In fact, you can use webapp for testing, or you can write an interface for testing yourself.

The VS2019 version I used for testing is Microsoft Visual Studio Enterprise 2019 Version 16.8.2. And I installed .net 5.0 Runtime on the machine.

enter image description here

enter image description here

For your question, describe in detail the steps of testing under Linux:

Step 1. Create Core5.0 Webapi Project.

enter image description here

Step 2. Test in local, and it works fine.

enter image description here

Step 3. Deploy to azure with Deployment mode is Framework-dependent.

enter image description here

And test it, it look likes something wrong because the project don't set default route, and I input the WeatherForecast to access default interface, it works.

enter image description here

Step 4. Deploy to azure with Deployment mode is Self-Contained like you pic.

enter image description here

And it also works fine.

enter image description here

Related