Base solution for your next web application
Open Closed

Problem when switching localization #7146


User avatar
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: I got an 'HTTP Error 404.0 - Not Found': 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:


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

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

  • User Avatar
    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:

  • User Avatar
    0
    maliming created
    Support Team

    Does your iis have a Rewrite module installed?

  • User Avatar
    0
    quantavn created

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

  • User Avatar
    0
    maliming created
    Support Team

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

  • User Avatar
    0
    quantavn created

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