Base solution for your next web application
Open Closed

Publishing to an IIS subdirectory #12347


User avatar
0
eftimevalerian created

Hello,

I am currently using ASP.NET ZERO (ASP.NET Core + jQuery-based MVC) and encountering issues when publishing to an IIS subdirectory. We have deployed the application under the /new folder, but the code does not recognize the /new prefix, resulting in a "file not found" error. The website functions perfectly without the /new prefix when published as the main application.

I have set the "WebSiteRootAddress": "https://hostname/new" in appsettings.json and tried using the app.UsePathBase("/new") along with <base href="/new/"> in layout.cshtml, but none of these solutions have worked. As a workaround, I have manually identified the URL and redirected it based on that. Is there a better solution to this problem?

Thank you in advance,


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @eftimevalerian

    Could you open browser console and share a screenshot with info@aspnetzero.com about this problem ?

    Thanks,