Base solution for your next web application
Open Closed

Publish on IIS #5681


User avatar
0
amitjpat created

What are the steps to publish ASP.NET Core and Angular 6 website on IIS?


3 Answer(s)
  • User Avatar
    1
    maliming created
    Support Team
  • User Avatar
    1
    mdframe created

    amitjpat - this is a great question from my perspective as I just learned how to get ANZ with Core and Angular 6 working and additionanl documentation would be beneficial.

    First, deploy your ASP.NET solution by right-clicking on the Web.Host project and selecting publish. You will need to set your appsettings.production.json as Publish is a release which equals production. At this point its like any other IIS ASP.NET release. You should be able to point to the URL you specified in your appsettings.production.json file, if you also matched it in IIS. I recommend this first to verify IIS is hosting your application correctly.

    Once the above step is complete you will need to install cors.exe and rewrite_amd64.msi on your web server. These items are very important to support the web.config and appsettings.json files in your angular application. To deploy your angular portion perform ng build --prod to create the dist directory for deployment. Also, make sure to add the web.config file from the root of your angular directory that was included with your download.

    Deploy this to your root IIS folder. I recommend looking at the Azure release documentation on ASPNETZero.com as it does give some details on setups not stated here.

    Everything above assumes you are hosting on a Windows 2016 web server. If everything is deployed correctly and setup in IIS the application should execute as expected.

    Good luck!

    Matt

  • User Avatar
    0
    ismcagdas created
    Support Team

    We will create a document for this.