IIS Virtual Directory

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 2 ans
We are currently setting up NopCommerce in IIS Virtual directories. i.e. domain.com/US/ or domain.com/IN/. When looking at the browser console  we see the following errors:

Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/main/en/timeZoneNames.json:1 Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/main/en/ca-gregorian.json:1 Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/supplemental/numberingSystems.json:1 Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/supplemental/weekData.json:1 Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/main/en/numbers.json:1 Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/supplemental/timeData.json:1 Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/main/en/currencies.json:1

It appears that the virtual path is not being applied when an IIS virtual directory is used.
i.e.
/lib_npm/cldr-data/main/en/currencies.json
should be:
/US/lib_npm/cldr-data/main/en/currencies.json
for a virtual directory /US

Thank You.
Il y a 2 ans
Well, what if you try to change the name of the virtual directory to more than 2-letters, the problem persists?
Il y a 2 ans
Thank you for the response. The issues still persists when the virtual directory contains more than two characters. We tested with both a 3 and 5 character virtual directories.

In the admin area we are seeing issues for jquery.min.js and site.webmanifest requests.
In the public store we see a similar error for icons. The path does not include the virtual directory.

console errors: missing virtual directory after localhost/
http://localhost/icons/icons_0/favicon-32x32.png favicon-32x32.png
http://localhost/lib_npm/cldr-data/main/en/numbers.json 404 (Not Found)  jquery.min.js:2
Il y a 2 ans
You are configuring exactly virtual directories or sub-applications since "IIS Virtual Directories aren't supported with ASP.NET Core apps" (see documentation)?
Il y a 2 ans
Thank you for the link to the documentation. I apologize I was using the wrong terminology. We are using sub-applications with their own app pools NOT virtual directories and are seeing the issues stated above.
Il y a 2 ans
You are right about errors in some file paths in the admin area, we will fix it.
As for the icons in the public, you need to rebuild the icon archive (if you used the RealFaviconGenerator) using the path with the virtual directory (e.g. /us/icons/icons_0) or replace all such paths in the icon files manually. Perhaps we should explain this point about the icon paths a little more clearly in the hint and docs.
Il y a 2 ans
Thank you looking into this and for the information on the icons.
Il y a 2 ans
Hi, brandon71

Done. Please see this commit.

brandon71 wrote:
We are currently setting up NopCommerce in IIS Virtual directories. i.e. domain.com/US/ or domain.com/IN/. When looking at the browser console  we see the following errors:

Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/main/en/timeZoneNames.json:1 Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/main/en/ca-gregorian.json:1 Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/supplemental/numberingSystems.json:1 Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/supplemental/weekData.json:1 Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/main/en/numbers.json:1 Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/supplemental/timeData.json:1 Failed to load resource: the server responded with a status of 404 ()
/lib_npm/cldr-data/main/en/currencies.json:1

It appears that the virtual path is not being applied when an IIS virtual directory is used.
i.e.
/lib_npm/cldr-data/main/en/currencies.json
should be:
/US/lib_npm/cldr-data/main/en/currencies.json
for a virtual directory /US

Thank You.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.