[INACTIVE] Subpath issue in IIS with app directory, duplicating subpath

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

The xhr requests are duplicating the subpath when adding fields and editing those fields.
For example: POST /admin/admin/, PUT /admin/admin/admin/

This is visible in the network tab of the chrome browser dev tools, and also in the IIS logs, as seen here:

image

Expected behavior

All requests should always be to /admin/, and never duplicate the base path: e.g. POST /admin/, PUT /admin/*

Minimal reproduction of the problem

Create an application inside an existing IIS website to host squidex under.

image

Add the base path to appsettings:

image

Front-end client seems to start duplicating the /admin as visible in network client on DELETE,POST,PUT requests … It leads to 404 requests when you do operations on the same object, and requires a page refresh (f5) to continue …

Environment

  • [ ] Self hosted with docker
  • [x] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: 5.8.2

Browser:

  • [x] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

I’m able to solve the issue by adding a rule to the web.config in the meantime, but figured I’d still report this, since it should work without the following:

Which fixes the URL issue in IIS as seen in IIS logs:

image

Where do you have the “basePath” setting from?

Squidex extracts the base path from urls:baseUrl. If you have a good setup for IIS you could provide a PR for that. I have issues to get debugging working.

Sorry, I was not aware that the basePath is actual a supported property :smiley:

I think when hosted under IIS, the base path is already set by the IIS integration. Therefore the double base path.

I tested the IIS integration for this bug and I have not set the basePath setting:

https://support.squidex.io/t/basepath-for-orleans-admin/3097/7