sandy
sandy

Reputation: 746

Unable to publish Web API from Visual Studio

I have created a simple web API in ASP.NET Core and wanted to publish to Azure Web App. I'm using free trial subscription and have only one web app resource created in Azure. The app service plan is using free tier 'D1' SKU and is the only one present in my subscription. However, while trying to publish the web API by choosing this web app in Visual Studio publish profile, it says 'there are no existing instances available'.

The web app resource does appear here:

enter image description here

Clicking next while the resource is selected, results in the issue:

enter image description here

Upvotes: 1

Views: 1137

Answers (3)

Harrison Wu
Harrison Wu

Reputation: 472

Just skip it! click 'skip this step', it will be published.

Upvotes: 0

ec-milan
ec-milan

Reputation: 41

Seems like you created a Web API resource and no API Management resources. Those two are independent Azure services. Former is needed to host your API application. The other one provides additional features to your APIs and is completely optional - you can look it up in the official documentation.

The step to select/configure API Management resource was introduced in deployment wizard at some point. It is confusing and probably could be handled differently.

Unless you need API Management resource, just skip the step and you'll have deployment profile ready.

Skip API Management selection step

Upvotes: 4

Venkatesan
Venkatesan

Reputation: 10515

  • I have created a .Net Core Web App in the Azure free trial Subscription with free tier plan

enter image description here

  • Initially it contains only hoststart.html

KUDU Console of Initial App Service

enter image description here

  • Created a sample .Net Core Web API Application in Visual Studio and tried to Publish to the App Service which I have created in Azure portal
  • Make sure you have login to the same subscription in Visual Studio where you have created the web app in Portal
  • Initially it was prompted to re-enter the credentials after changing the Azure Subscription,I have refreshed the Visual Studio , after few seconds Iam able to see the correct Subscription details.
  • Iam able to see the App Service which I have created in Portal

enter image description here

  • Able to successfully deploy the WebAPI to the App service in Portal

KUDU Console of App Service after Publishing the WebAPI from Visual Studio enter image description here

Deployed WebAPI Output

enter image description here

Update

You are in the correct path, after selecting the web app it asks to create the api.Click on the + symbol and add the API Management

enter image description here

Upvotes: 1

Related Questions