简体   繁体   中英

Asp.Net Core Web API on Azure

I am writing a WebAPI using Asp.Net Core 2 and trying to publish it to Azure but I cannot access the API through API Management Service. I am able to publish an older Asp.Net WebAPI with the same connection string and access it just fine, but the Asp.Net Core Web API I am not. I also notice that the Asp.Net Core API is listed as a Web App but the WebAPI is listed as a Api App. What am I doing wrong?

Azure Portal

I also notice that the Asp.Net Core API is listed as a Web App but the WebAPI is listed as a Api App.

As I have tested, when you create WebAPI in vs you choose Azure API App template, so after deploying, it is listed as a API App.
在此处输入图片说明

When you add a new API with API App in APMS, it only get the WebAPI and could not access to Asp.net core WebAPI. 在此处输入图片说明

For more details about access the API through API Management Service, you could refer to this article .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM