Not able to access my microservices in .Net core gateway Rest API microservice architecture through gateway deployed on azure app service

Animesh Singh 21 Reputation points
2022-09-12T05:53:41.09+00:00

I have multiple project solution written in .net core which follows gateway REST API microservices ( gateway URI is exposed to the client and internally gateway API makes http call to my other microservice). This approach works fine in my local machine by running all other microservices at a time but when I deploy my code to azure app service by github actions my microservices are not accessible and i'm getting "NOT found" error.

Could some please help or guide me how to solve this issue or what i'm doing wrong?

Below is my github action .yml file

name: Build and deploy ASP.Net Core app to Azure Web App - MyAPPName

on:
push:
branches:
- dev
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:  
  - uses: actions/checkout@v2  

  - name: Set up .NET Core  
    uses: actions/setup-dotnet@v1  
    with:  
      dotnet-version: '6.0.x'  
      include-prerelease: true  

  - name: Build with dotnet  
    run: dotnet build md_server.sln --configuration Release  

  - name: dotnet publish  
    run: dotnet publish md_server.sln -c Release -o ${<!-- -->{env.DOTNET_ROOT}}/myapp  

  - name: Upload artifact for deployment job  
    uses: actions/upload-artifact@v2  
    with:  
      name: .net-app  
      path: ${<!-- -->{env.DOTNET_ROOT}}/myapp  

deploy:
runs-on: windows-latest
needs: build
environment:
name: 'dev'
url: ${<!-- -->{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:  
  - name: Download artifact from build job  
    uses: actions/download-artifact@v2  
    with:  
      name: .net-app  

  - name: Deploy to Azure Web App  
    id: deploy-to-webapp  
    uses: azure/webapps-deploy@v2  
    with:  
      app-name: 'MyAPPName'  
      slot-name: 'dev'  
      publish-profile: ${<!-- -->{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_*********** }}  
      package: .  
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
963 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,203 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,945 questions
0 comments No comments
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 18,366 Reputation points
    2022-09-14T06:35:41.19+00:00

    Update: The issue was fixed by deploying other microservices and by creating virtual directory under azure app service.

    Thanks @Animesh Singh for confirming and sharing the resolution that worked for you. It would be helpful for other community members having similar issue.

    0 comments No comments

0 additional answers

Sort by: Most helpful