Open Closed

Issue with ABP application deployed to IIS subfolder #4982


User avatar
1
christian@extranerds.com created

I am writing to request assistance with an issue I am experiencing with an application that I have deployed to IIS under a subfolder. Specifically, I am encountering problems with the application's routing configuration, which is causing the application to lose the subfolder and display incorrect paths when using HTML or Navigation Manager.

NavigationManager.NavigateTo($"/log-details/{input.Id}", forceLoad: false);

```     @if (!CurrentUser.IsAuthenticated)
        {
            &lta href=   "../Account/Login"   class="btn btn-primary mb-1"&gt
                @L["Login"]
            &lt/a&gt
        }

When I click on menu items, the routing works correctly and includes the subfolder (e.g., localhost/test/account/login), but when using HTML or Navigation Manager, the subfolder is lost, and the path becomes incorrect (e.g., localhost/account/login).

I suspect that this issue is related to the routing configuration not being correctly set up to handle subfolders. However, I am not sure how to resolve this problem.

Here is some information about my setup:

  • ABP Framework version: v7.0.1
  • UI type:Blazor
  • DB provider: EF Core

Thank you for your help.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you try to remove /?

    NavigationManager.NavigateTo($"log-details/{input.Id}", forceLoad: false);
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    christian@extranerds.com created

    That seems to help, I also had to remove it from generated code by the template, like here

            private  async Task DownloadAsExcelAsync()
            {
                var token = (await AcquisitionsAccountsAppService.GetDownloadTokenAsync()).Token;
                NavigationManager.NavigateTo($"/api/app/acquisitions-accounts/as-excel-file?DownloadToken=        {token}&FilterText={Filter.FilterText}", forceLoad: true);
            }
    

    However, there are still some instances when it breaks. When I click Sign Out, it sends me to a page without the subfolder like this http://localhost/?page=%2FAccount%2F~%2FAccount%2FLogin

    Also, I still do not have a solution for

       @if (!CurrentUser.IsAuthenticated)
            {
                &lta href=   "../Account/Login"   class="btn btn-primary mb-1">
                    @L["Login"]
                </a>
            }
    

    I tried adding a button to with a click event

    NavigationManager.NavigateTo("Account/Login", forceLoad: false);

    but gives me a 404

    Any ideas?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    I will check all redirects in commercial modules.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you try to set base?

    MyCompanyName.MyProjectName.Blazor/wwwroot/index.html

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 21, 2026, 06:18
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.