Bundling and minifying for site subfolder

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 anni tempo fa
Hey community!

I have strange problem with CSS BUNDLING. I did publish of Nop.Web. After that I hosted it localy as application of Defaul Site in local IIS (mark as 1 on image). I have bundled css file. But I see a lot of 404 errors for resources (fonts, icons etc) that were used in css files via relative path. I see in console that site tries to find resources in wrong storage. It uses link without application name. For example it uses http://localhost:8080/Themes/Uptown/Content/fonts/DroidSerif-Italic.woff2 but should use http://localhost:8080/Nop.Web.Publish/Themes/Uptown/Content/fonts/DroidSerif-Italic.woff2

After that I raised another local sites (marked as 2 on image). For that site I used same codebase. And now I don't see 404 errors for site. It looks and works fine. It's very strange scenario. May somebody help me ? Thanks in advance
6 anni tempo fa
rznELVIS wrote:
Hey community!

I have strange problem with CSS BUNDLING. I did publish of Nop.Web. After that I hosted it localy as application of Defaul Site in local IIS (mark as 1 on image). I have bundled css file. But I see a lot of 404 errors for resources (fonts, icons etc) that were used in css files via relative path. I see in console that site tries to find resources in wrong storage. It uses link without application name. For example it uses http://localhost:8080/Themes/Uptown/Content/fonts/DroidSerif-Italic.woff2 but should use http://localhost:8080/Nop.Web.Publish/Themes/Uptown/Content/fonts/DroidSerif-Italic.woff2

After that I raised another local sites (marked as 2 on image). For that site I used same codebase. And now I don't see 404 errors for site. It looks and works fine. It's very strange scenario. May somebody help me ? Thanks in advance


Is Nop.Web.Publish virtual folder or normal folder under the localhost? If its normal folder you'll have to make a virtual folder.
6 anni tempo fa
seanrock wrote:

Is Nop.Web.Publish virtual folder or normal folder under the localhost? If its normal folder you'll have to make a virtual folder.


Hey, seanrock! Thanks for you reply.

Nop.Web.Publish is application (not virtual directory). Try to host Nop.Web as virtual directory wasfailed because of authentication issues with <authentication mode="Forms"> (web.config)


In my vision apllication provides more abilities then virtual directory (https://docs.microsoft.com/en-us/iis/get-started/planning-your-iis-architecture/understanding-sites-applications-and-virtual-directories-on-iis)
6 anni tempo fa
Please see hint of the "CSS bundling and minification" option in admin area (it doesn't work in subfolders):

"Enable to combine (bundle) multiple CSS files into a single file. Do not enable if you're running nopCommerce in IIS virtual directory. Note that this functionality requires significant server resources (not recommended to use with cheap shared hosting plans)."
6 anni tempo fa
Andrey, I got it! Thanks a lot! Developers don't like doucmentation :)
6 anni tempo fa
I think we just should make it more visible
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.