Kentico 13 Core (ver. 13.0.104).
After updating Visual Studio 2022 (ver. 17.5.4) all the links referenced as ~/... (Example: ~/Content/Styles/Site.css) stopped working.
I noticed the same issue on the Dancing Goat site.
The page builder and form builder scripts and styles no longer load (404s). Nothing loads under /Kentico or /_content path: Example: /Kentico/Scripts/builders/builder.css /Kentico/Scripts/builders/page-builder.css /_content/Kentico.Content.Web.Rcl/PageBuilder/Admin/InlineEditors/DropdownEditor/DropdownEditor.css /_content/Kentico.Content.Web.Rcl/PageBuilder/Admin/Selectors/FormComponents/Attachments/attachment-selector.admin.js
I have the app.UseStaticFiles(); added to Startup.cs
I even tried this but no luck: app.UseStaticFiles(new StaticFileOptions { OnPrepareResponse = ctx => ctx.Context.Response.Headers.Append(HeaderNames.CacheControl, $"public, max-age={60 * 60 * 24 * 365}"), FileProvider = new PhysicalFileProvider(Path.Combine(Environment.ContentRootPath, @"wwwroot")), RequestPath = new PathString("/wwwroot") });
I assume you are using .NET 6 - if yes, in this case the VS update causes the defaults of the hosting model to be set "InProcess". Changing this to the "OutOfProcess" should fix the issue. But still, we are looking why the first mentioned is not working after the update.
OMFG! Juraj you are a genius!
I changed the hostingModel from "InProcess" to "OutOfProcess" in the web.config and everything works again!
I was struggling with this issue for almost a week!
Thank you Juraj! You're a lifesaver!
Well, I was scratching my head hard too. In fact, it was one of our QA engineers who noticed this! So the credits should go there :-) I am just the messenger!
Please, sign in to be able to submit a new answer.