I'm not sure how mapping the media files of each site to their respective folders in Azure blob would be a problem, as it's just a dynamic way of specifying each site. They're all still in their own separate folders, and I can see the correct mapped paths logged from the OnInit code. Did you take a look at the mapping code link - do you see any issues with that?
A major source of confusion for me is that it's also working in the admin, so there's no real file to push in a web farm task. Shouldn't the Azure blob mapping pull files as needed into the App_Data folder as it was before the upgrade?
Given this setup with blob storage, I also don't think shared storage is applicable, or am I misunderstanding?
Here's a full copy of the 404 output. It doesn't even look like the route is being processed by the appropriate handler.
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Most likely causes:
The directory or file specified does not exist on the Web server.
The URL contains a typographical error.
A custom filter or module, such as URLScan, restricts access to the file.
Things you can try:
Create the content on the Web server.
Review the browser URL.
Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click here.
Detailed Error Information:
Module ManagedPipelineHandler
Notification ExecuteRequestHandler
Handler CMS.AspNet.Platform.Routing.ReadOnlySessionActionResultHttpHandler
Error Code 0x00000000
Requested URL http://lummus:80/getmedia/91c35263-d4cb-4ef9-9abe-8d44fe399aca/innovaion-blue-2.jpg
Physical Path C:\Users\steph\Workspaces\Lummus_MVC\Lummus\getmedia\91c35263-d4cb-4ef9-9abe-8d44fe399aca\innovaion-blue-2.jpg
Logon Method Anonymous
Logon User Anonymous
Is there some extension method I need to run for file routing like UsePageRouting? Here's a copy of my RouteConfig.cs. I do have runAllManagedModulesForAllRequests enabled in the web.config.
using System.Web.Mvc;
using System.Web.Routing;
using Kentico.Web.Mvc;
namespace Lummus
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
// route for sitemap
routes.MapRoute(
name: "Sitemap",
url: "sitemap.xml",
defaults: new { controller = "Sitemap", action = "Index" }
);
// route for robots
routes.MapRoute(
name: "Robots",
url: "robots.txt",
defaults: new { controller = "Robots", action = "Index" }
);
// route for manifest.json
routes.MapRoute(
name: "Manifest",
url: "manifest.json",
defaults: new { controller = "Manifest", action = "Index" }
);
// Map routes to Kentico HTTP handlers first as some Kentico URLs might be matched by the default ASP.NET MVC route resulting in displaying pages without images
routes.Kentico().MapRoutes();
// This will honor Attribute Routing in MVC [Route("")] and [RoutePrefix("")] over Dynamic Routing
//<see href="https://devblogs.microsoft.com/aspnet/attribute-routing-in-asp-net-mvc-5/">See Attribute Routing</see>
routes.MapMvcAttributeRoutes();
// Redirect to administration site if the path is "admin"
// Can also replace this with the [Route("Admin")] on your AdminRedirectController's Index Method
routes.MapRoute(
name: "Admin",
url: "admin",
defaults: new { controller = "AdminRedirect", action = "Index" }
);
// This will again look for matching routes or node alias paths, this time it won't care if the route is priority or not.
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}
I also did the failed request tracing (logged here), and I do see CMSGetMedia in there, but it looks like it might be passing it off? Not familiar with reading these logs.