Base solution for your next web application
Open Closed

Publish ASP.NET CORE AND ANGULAR (Single solution) on Azure hosting #9957


User avatar
0
shujat.munawar created
  • What is your product version? V 10.0.0

  • What is your product type (Angular or MVC)? ASP.NET CORE AND ANGULAR (Single solution)

  • What is product framework type (.net framework or .net core)? .NET 5

  • What is the power tool version? V 2.7.6

I am looking to deploy/Publish the project (Single solution) to Azure hosting. Would you please share any guideline to follow on it please?


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team
  • User Avatar
    0
    shujat.munawar created

    Hi @ismcagdas
    I am dong the following steps to deploy ASP.NET CORE AND ANGULAR (Single) Merged solution on single hosting but it didn't work:

    1. Build the project

    2. ng build --prod command to create a dist folder inside .Web.Host/wwwroot folder

    3. Import the Azure publish profile and deployed the .Web.Host project

    After doing all these steps when deployement finished. It saying page not found
    https://staask-stage.azurewebsites.net/Error?statusCode=404

    Please wuold you guide or tell me what am i doing worng

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    After step2, you need to move files from .Web.Host/wwwroot/dist to .Web.Host/wwwroot.

  • User Avatar
    0
    shujat.munawar created

    Hi,
    Thanks a lot for your response.
    I followed your instruction and moved the files and then publish. (Now not getting 400)
    Seems like there is something missing for Server side. You can see in the below link:
    https://staask-stage.azurewebsites.net/index.html

    Please let me know if we missed to do any configuration
    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Yes, it seems like you haven't configured appconfig.production.json for your Angular app. The Angular app tries to connect to localhost, see:

    image.png