Create Web Api and publish on Azure App Service



Create Web API  and publish to Azure App Service


1) Create File, open new project from VS 2017 and enter project name .





      

2   2) Select template " ASP.NET Web Application(.NET framework) and Azure API App.




     3) click ok , system will generate applicaiton from vs 2017  as shown below.




   4) Right on project solution and build and press F5 to test application from local.
     

   5)  you  should be able to see screen with error message HTTP Error 403.14 - Forbidden" , because in my application I don’t have any User interface .

   6) To fix this issue i need to update URL  with http://localhost:62170/api/values/1 , then you should be able to see below screen with values from Web api.




   7) Right  click on solution and "Publish " to Azure  and select Exsting .




    8) I have create "Azure App Api " in the previous post . please go through below url  here for more details about App Api.



   9) Click on "Publish" , you should  able to screen as shown below.
      

         10) you should be able to see  publish app url is opeing from browser  ,like here.




     11) Now i am going to test my api with Azure URL  as shown below screen shot.





   12) if you observe test results are accurate , when i  test my api from local as well as Azure portal .


    13)  you should be able to see Api  from Azure portal as shown below.

























Comments

Popular posts from this blog

Azure Storage Tables with Visual Studio 2017

Azure Storage Accounts

What is Azure?