When we try to access umbraco under the http://website/cms, we get a page not found for our cms pages (and this is working when umbraco is in the root web site).
Also, if we try to access the back office, the screen loads but some resources are not working:
We have tried to play with these Umbraco global settings:
I've tested this on a clean install by changing the URL/path in the Properties\launchSettings.json file's iisExpress section to:
"applicationUrl": "http://localhost:9000/cms"
And setting the ApplicationVirtualPath hosting setting to /cms, which should represent the same setup as you've described (but using IIS Express and stripping the trailing slash).
This did result in the front-end (The Starter Kit) rendering all links/images without an issue, but the back-end showed the same error.
When inspecting the global JavaScript variable Umbraco.Sys.ServerVariables on the login screen, it's clearly not including the application virtual path when generating the URLs:
So this seems like a bug in the current routing/link generation, which you can report on the issue tracker and/or create a PR for on https://github.com/umbraco/Umbraco-CMS/.
But even if this gets fixed (which I expect won't get high priority, as it's not a common/recommended setup), there are other issues you need to deal with:
All paths (including 3rd party packages) need to use the application path (e.g. use ~/App_Plugins/... instead of /App_Plugins/...
IIS configuration gets inherited from the parent application by default, so you need to make sure this doesn't cause issues
I would recommend running Umbraco on a subdomain instead or integrate it into the application that's running in the domain root.
Host Umbraco in IIS web site child application
Hi,
We are trying to host Umbraco v9.1.2 in IIS in a site child application called cms.
We set the applicationvirtualpath in the appsettings.json.
When we try to access umbraco under the
http://website/cms
, we get a page not found for our cms pages (and this is working when umbraco is in the root web site).Also, if we try to access the back office, the screen loads but some resources are not working:
We have tried to play with these Umbraco global settings:
but no success.
we also, added this to our startup.cs
Even with these parameters, the api urls and some resources url are still not set properly.
It seem the
LinkGenerator.GetPathByAction
is not considering thePathBase
.Is there something else we need to set. How can we get this to work properly?
thanks
I've tested this on a clean install by changing the URL/path in the
Properties\launchSettings.json
file'siisExpress
section to:And setting the
ApplicationVirtualPath
hosting setting to/cms
, which should represent the same setup as you've described (but using IIS Express and stripping the trailing slash).This did result in the front-end (The Starter Kit) rendering all links/images without an issue, but the back-end showed the same error.
When inspecting the global JavaScript variable
Umbraco.Sys.ServerVariables
on the login screen, it's clearly not including the application virtual path when generating the URLs:So this seems like a bug in the current routing/link generation, which you can report on the issue tracker and/or create a PR for on https://github.com/umbraco/Umbraco-CMS/.
But even if this gets fixed (which I expect won't get high priority, as it's not a common/recommended setup), there are other issues you need to deal with:
~/App_Plugins/...
instead of/App_Plugins/...
I would recommend running Umbraco on a subdomain instead or integrate it into the application that's running in the domain root.
Perfect. thanks!
I created this bug: https://github.com/umbraco/Umbraco-CMS/issues/11891. Until this is fixed we will see if it is possible for us to have a subdomain.
thanks
is working on a reply...