For the sake of argument, let's say my K12 Portal Engine site is in D:\WebRoot\SiteName. We're working on automated Azure Release Pipelines, but what we want to eventually be able to do is to obliterate the SiteName folder each rollout, but without having many, many GB of images, audio, video, etc., in our repo. Blob storage is not an option, local IIS file system storage is the only thing permissible, and if this cannot be done under that limitation, then it simply cannot be done for the intents and purposes of this post.
Based on this and related postings, I copied everything to D:\WebRoot\SiteNameMedia and updated the relevant setting. However, Kentico keeps creating additional empty folders in that location, including a CMSPages folder, and no matter how many times I blow away the cache, Kentico keeps trying to serve the URLs from the old location, which naturally 404s. Basically, whether I leave those settings at default or not, Kentico won't load images now that I've moved them out of Kentico's default location. No change in settings, restarting of the app, clearing of server cache, etc., stops Kentico from serving from sitename.com/KenticoSiteNmaeInSettings/media/mediaLibraryNameThatSettingsMakeVeryClearWeAreNotUsing/imagename.png Nothing I've found online and followed has even allowed the main logo of the site to load. I know the files exist, I can see them in Explorer, and this all worked just fine before I touched the media location. Media Libraries were NOT being used on this particular site, (it's our smallest Kentico app, hence why it was chosen as the gueanea pig for this,) but I'm getting less and less certain whether I need a Q&A or an exorcist for this thing.
Again, any other than the exact folder structure I listed above is not a valid solution within our limitations. If a license issue is at play, (server farm stuff, whatever,) that's also a deal breaker for this issue. The company is very, very, VERY tightly regulated externally, and internally we regulate ourselves more tightly still, so "You just need to xyz" answers may not be possible. If the answer is, "You can't do that without a server farm license," then that's what I'll have to go back and say to The Powers That Be.
Thanks for taking time out of your Christmas week to read!