Base solution for your next web application
Open Closed

Deployment-Angular-Publish-IIS #12563


User avatar
0
MarturAbpUser created

Hello,

https://docs.aspnetzero.com/aspnet-core-mvc/latest/Deployment-Angular-Publish-IIS We have completed all the steps in the link above. However, our Angular site is still not opening. We installed the programme from this link: https://www.iis.net/downloads/microsoft/url-rewrite. We tried both placing the dist folder we obtained with npm run publish into the wwwroot directory and placing it into the project folder.

And also we tried below the code.

The last one API is working.

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

5 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @MarturAbpUser

    Could you please share your project version with us?

    In the latest version of Angular, after running the ng build command, you need to copy or move the contents of the browser folder (located under the dist directory) into the project folder (named after your project) under inetpub/wwwroot in IIS Express.

    Could you please make sure that the files have been added as shown in the screenshot below? Is your configuration set up this way?

    C:\inetpub\wwwroot\angular

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @MarturAbpUser

    Thank you for the detailed information and screenshots. When publishing Angular, I recommend using the yarn publish or npm run publish command instead of the ng build command, because the configuration won't be set to production. Therefore, it won't be using the appconfig.production.json file. The information in the appconfig.production.json file is assumed to be corrected to use the production environment URL.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    MarturAbpUser created

    I shared in below pictures my configurations. As you can see issue in the picture, there is Checkdatabase error. How can I fix the problem? Or change? I added also HttpPost attribute but it's not working (normally there wasn't HttpPost attribute). I have attached log file. !

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    This problem is resolved via remote support.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    MarturAbpUser created

    [ismcagdas] said: This problem is resolved via remote support.

    Thank you so much for your support and professionalism.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)