Open Closed

Problem when switching localization #7146


0
quantavn created

I'm using ASP.NET Core & Angular (v7.0.0). I can deploy to the local IIS and open both the Host and the Web. But whenever I click on the flag to switch to another localization: image.png I got an 'HTTP Error 404.0 - Not Found': image.png Press F5 to refresh is no help. I can only open the Web again if I change the URL from: 'http://localhost:8080/app/admin/hostDashboard' to 'http://localhost:8080/' then click Enter: image.png


6 Answer(s)
  • 0
    maliming created

    What is the content of the web.config file for your website (angular)?

  • 0
    quantavn created

    I don't use any web.config file in the angular website now.

    If I follow the instruction "ASP.NET Zero Angular UI contains a web.config file. You can copy it to the web site's root folder to overcome the problem described above." (https://docs.aspnetzero.com/documents/aspnet-core-angular/latest/Deployment-Angular-Publish-IIS) I got this error: image.png

  • 0
    maliming created

    Does your iis have a Rewrite module installed?

  • 0
    quantavn created

    Do you mean this one: https://www.iis.net/downloads/microsoft/url-rewrite

  • 0
    maliming created

    Yes, after you install, try copying the web.config to the website (angular) directory.

  • 0
    quantavn created

    Yes, the issue is missing URL Rewrite module. Solved after installing it. Thanks.