Azure App Service Web Application and API

Anonymous
2023-05-12T09:32:28.88+00:00

Hi,

I have a solution with two projects:

  1. Web Application
  2. API

and I am using Azure App Service

I have defined the website and the API in my Azure APP Service and it's working fine.

My issue is here..

  • When I Publish the Web Application I can see the website live and I am able to access it using the azure domain as well as my custom domain names but the API will not work
  • and When I Publish the API, Ia m able to see the API and able to call it but the Web Application will show No webpage was found for the web address

I am assuming that they are being copied to the same location so every time I copy one the other one will not work?

How can I fix this please?

I am using Visual Studio for Mac.

Thanks,

Jassim

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AirGordon 7,165 Reputation points
    2023-05-12T11:13:21.36+00:00

    Have you declared virtual applications in the App Service?
    What method are you using for publishing?

    When you open the App Service and browse the files, has the publish "cleaned" the other apps files up?

    My gut is that you're using a simple deployment mechanism like ZipDeploy via Visual Studio Publish Profile that is not correctly deploying for your configuration when you're deploying over the top.

    Deploying two projects to one App Service isn't a problem, but requires testing and optimising your deploy.
    I think what you'll need to do is; better prepare your files locally, before then doing a single deploy command. My preference on deploying to App Service is with GIT source binding rather than a Visual Studio Publish.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.