I've been working on an Umbraco site (7.12.4 with VS2017) and before Christmas all was fine. I've opened it up again to continue working and suddenly all of the static content is no longer being displayed.
This includes folders such as;
/Assets/
/Scripts/
/App_Plugins/
The first 2 are listed in umbracoReservedPaths and I've never had to add the 3rd before. I'm getting errors attempting in the backend with megaNav not finding it's editor files in that path.
I've reinstalled the nuget package, compared Web.config against other working sites on the same development PC (within the same solution) and nothing obvious stands out.
umbracoReservedPaths lists the folders I have excluded
runAllManagedModulesForAllRequests is set to true
StaticFileHandler module is loaded
If I load an image with a query string, then it is loading but that doesn't help with all the javascript & CSS files. Here are some curl outputs;
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 27130 (#0)
> GET /Assets/images/logo-dark.png HTTP/1.1
> Host: localhost:27130
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 27130 (#0)
> GET /Assets/images/logo-dark.png?width=50 HTTP/1.1
> Host: localhost:27130
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
If I place the image in the root folder, it is retrieved without issue.
The issue is directly accessing any sub folders just stopped working and I've run out of options in attempting to fixing it. I'd be grateful if anyone had any suggestions.
I've found a work around by adding this into the Web.config for each of the paths I want excluded in umbracoReservedPaths, this is the first time I've had to do it in any project.
David, thank you for this. We're running up against IIS Memory limits in 32-bit mode.
But upon changing to 64-bit mode, static assets stop working. The application seems to work per usual, as I've tested various API's and other controller functionality.
Not 100% sure why this is, but your solution seems to work. I've added a handler for every location, including umbraco,umbracoclient, appplugins, etc.
Out of curiosity, were you able to determine why the StaticFileHandler stops working all together when changing to 64-bit? Have you noticed any other unwanted side effects?
All the best, and thanks again for posting your solution.
-Marc
Hi Marc, glad to share the solution and get your site going.
I still don't know why it happened with a perfectly good working site. I kept investigating but could not find any solution. The site has been running perfectly fine since the change and no side effects have been noticed.
It's quite elusive. For what it's worth, our application pool in question has always been at 32-Bit for many years. With recent increase in usage, we're finding memory consumption is starting to cap out on this pool. This is especially noticeable when cropping images in Umbraco (e.g out of memory exceptions).
For that reason, I wanted to move to a 64 bit pool for more addressable memory. That's when the static file module stopped working. Could be IIS Role related, not sure if architectures are treated differently.
Either way, I prefer your solution to recycling the pool all the time :) Thanks again.
Static content no longer being served
Hi All,
I've been working on an Umbraco site (7.12.4 with VS2017) and before Christmas all was fine. I've opened it up again to continue working and suddenly all of the static content is no longer being displayed.
This includes folders such as;
The first 2 are listed in umbracoReservedPaths and I've never had to add the 3rd before. I'm getting errors attempting in the backend with megaNav not finding it's editor files in that path.
I've reinstalled the nuget package, compared Web.config against other working sites on the same development PC (within the same solution) and nothing obvious stands out.
If I load an image with a query string, then it is loading but that doesn't help with all the javascript & CSS files. Here are some curl outputs;
If I place the image in the root folder, it is retrieved without issue.
The issue is directly accessing any sub folders just stopped working and I've run out of options in attempting to fixing it. I'd be grateful if anyone had any suggestions.
Cheers!
I've found a work around by adding this into the Web.config for each of the paths I want excluded in umbracoReservedPaths, this is the first time I've had to do it in any project.
David, thank you for this. We're running up against IIS Memory limits in 32-bit mode.
But upon changing to 64-bit mode, static assets stop working. The application seems to work per usual, as I've tested various API's and other controller functionality.
Not 100% sure why this is, but your solution seems to work. I've added a handler for every location, including umbraco,umbracoclient, appplugins, etc.
Out of curiosity, were you able to determine why the StaticFileHandler stops working all together when changing to 64-bit? Have you noticed any other unwanted side effects?
All the best, and thanks again for posting your solution. -Marc
Hi Marc, glad to share the solution and get your site going.
I still don't know why it happened with a perfectly good working site. I kept investigating but could not find any solution. The site has been running perfectly fine since the change and no side effects have been noticed.
Cheers!
Fantastic, appreciate you providing that update.
It's quite elusive. For what it's worth, our application pool in question has always been at 32-Bit for many years. With recent increase in usage, we're finding memory consumption is starting to cap out on this pool. This is especially noticeable when cropping images in Umbraco (e.g out of memory exceptions).
For that reason, I wanted to move to a 64 bit pool for more addressable memory. That's when the static file module stopped working. Could be IIS Role related, not sure if architectures are treated differently.
Either way, I prefer your solution to recycling the pool all the time :) Thanks again.
is working on a reply...