Starts in:
0 DAY
22 HRS
57 MIN
7 SEC
Starts in:
0 D
22 H
57 M
7 S
Open Closed

ABP program does not run with a virtual application on IIS #7257


User avatar
0
karl.ettinger@energieag.at created
  • ABP Framework version: v8.0.3
  • UI Type: Blazor Server
  • Database System: EF Core - SQL Server
  • Tiered (for MVC) or Auth Server Separated (for Angular): no

I have followed the article https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/?view=aspnetcore-7.0&tabs=visual-studio#app-base-path but still the ABP program does not run on the IIS server as a virtual application.

Under VS 2022 it works with IIS Express (except when registering a new user. There it returns to the wrong URL).

Do you have any idea why it does not work on the IIS server?

You can find the test program “BookStore” at: https://powershare.energieag.at/s/CHnNYKdBeNy7Ybo

Password: FKTwN)1bq@=_\3G

Screenshots are in the Screenshot folder.


18 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    Can you please try to run dotnet clean ,dotnet build and abp bundle again?

    thanks

  • User Avatar
    0
    karl.ettinger@energieag.at created

    Hallo

    I use a Blazor server project.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    I apologize for the inconvenience. I will check and get back to you ASAP.

    Thanks

  • User Avatar
    0
    karl.ettinger@energieag.at created

    Ok, and thanks for the info

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    have you checked this doc https://docs.abp.io/en/commercial/latest/startup-templates/application/deployment-iis?UI=BlazorServer&DB=EF&Tiered=No please check if find helpful

    Thanks

  • User Avatar
    0
    karl.ettinger@energieag.at created

    Thanks for the tip. I proceeded in the same way, except that I use a virtual application.

    The virtual application “BookStore” is created in the IIS under “Default Web Site” and I have also created an application pool “BookStore”. The system uses real domain names.

    When it is called: https://tbfs001wvv.powerentity.com/BookStore the following is displayed in the browser:

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    please check https://stackoverflow.com/questions/10512053/css-images-js-not-loading-in-iis

    Thanks

  • User Avatar
    0
    karl.ettinger@energieag.at created

    Hello,

    Thanks for the information, but I had already read this article before I contacted you. All the settings mentioned in this article are the same for my IIS.

    For your information: If I configure the test project I sent you without a virtual application and copy the deployment in IIS to “Default Web Site”, the test application works. It just does not work as a virtual application.

  • User Avatar
    0
    karl.ettinger@energieag.at created

    Hello,

    does my test application “BookStore” work on your IIS as a virtual application?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I will check it

  • User Avatar
    0
    karl.ettinger@energieag.at created

    Hello,

    here are some more findings on the attempt to get my BookStore application to run in IIS in an application.

    Initial situation:

    • Create the new pool BookStore in IIS under *Application Pools
      • Domain name tbfs001wvv.powerentity.com and certificates are stored under Default Web Site as well as the application pool DefaultAppPool; bindings https*.443;http:*.80
      • Create a new application with the name BookStore under Default Web Site and assign the application pool *BookStore
      • The folder waiver of Default Web Site is C:\inetpub\wwwroot
      • Create an Acme.BookStore folder under C:\inetpub\wwwroot.
        • Assign permissions IIS_IUSERS and IIS AppPool\BookStore to Acme.BookStore.
        • Copy the deployment files from the Acme.BookStore application in the Acme.BookStore folder
        • The Acme.BookStore application has the base href=“/BookStore/” entry in /Pages/_Host.cshtml and app.UsePathBase(“/BookStore”); is entered in BookStoreBlazorModule.cs/OnApplicationInitialization
    • Database BookStore is created and ready to use
    • In the Edge browser, retrieve the website https://tbfs001wvv.powerentity.com/BookStore
    • Result: Page https://tbfs001wvv.powerentity.com/BookStore does not work

    • Second BookStore application with base href=“~/” in /Pages/_Host.cshtml and without app.UsePathBase(“/BookStore”); in BookStoreBlazorModule.cs/OnApplicationInitialization
    • Deployment files of the second BookStore application copied to the C:\inetpub\wwwroot folder
    • In the Edge browser, retrieve the website https://tbfs001wvv.powerentity.com
    • Result: Page at https://tbfs001wvv.powerentity.com works

    • In the Edge browser, retrieve the website https://tbfs001wvv.powerentity.com/BookStore
    • Result: Page https://tbfs001wvv.powerentity.com/BookStore now also works

    • Delete only the deployment files under C:\inetpub\wwwroot (folder C:\inetpub\wwwroot\Acme.BookStore is retained)
    • In the Edge browser, retrieve the website https://tbfs001wvv.powerentity.com/BookStore
    • Result: Page https://tbfs001wvv.powerentity.com/BookStore does not work

    Summary: If the same deploment files are stored in the folder C:\inetpub\wwwroot as under C:\inetpub\wwwroot\Acme.BookStore, the page https://tbfs001wvv.powerentity.com/BookStore works. If the folder C:\inetpub\wwwroot does not contain the deployment files, the page https://tbfs001wvv.powerentity.com/BookStore does not work.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    this is a problem, i will fix it in the next patch verion

  • User Avatar
    0
    karl.ettinger@energieag.at created

    Hi,

    Please also consider the “href tag” of the Home button when using app.UsePathBase in MobilNavbar.

    Thank you

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    You can change the href in the MenuContributor

  • User Avatar
    0
    karl.ettinger@energieag.at created

    hi, thanks for the hint with MenuContributor. It works.

    What does not work with the MobileNavbar is the menu item “Login” with href=“/account/login”. Can I overwrite this href tag? I haven't found anything about this.

    In the desktop view, the href tag href=“account/login” is correct

    On the login page in the mobile view, I cannot see the optional login with “Azure Active Directory OpenId” and I cannot scroll up the login page. The page is cut off.

    On the Desktok login page, the view works (because it is larger).

  • User Avatar
    0
    karl.ettinger@energieag.at created

    hi,

    another problem when using app.UsePathBase is that the language selection does not work in either the mobile view or the desktop view. After selecting the language, the URL changes from “https://tbfs001wvv.powerentity.com/BookStore” to “https://tbfs001wvv.powerentity.com/https://tbfs001wvv.powerentity.com/BookStore”

    From:

    To:

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    On the login page in the mobile view, I cannot see the optional login with “Azure Active Directory OpenId” and I cannot scroll up the login page. The page is cut off.

    We fixed the problem, but you need to upgrade your version. This is a temporary solution: https://support.abp.io/QA/Questions/7251/Issue-on-login-page-745---81x#answer-3a12cb4a-ae51-7bbd-2ccb-de52af9d6e02

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    another problem when using app.UsePathBase is that the language selection does not work in either the mobile view or the desktop view. After selecting the language, the URL changes from “https://tbfs001wvv.powerentity.com/BookStore” to “https://tbfs001wvv.powerentity.com/https://tbfs001wvv.powerentity.com/BookStore”

    You don't need to app.UsePathBase

    What does not work with the MobileNavbar is the menu item “Login” with href=“/account/login”. Can I overwrite this href tag? I haven't found anything about this.

    This seems looks problem, we will fix it in the next patch version

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06