Ignoring static resources

Vote:
 

Hi all,

 

We’ve implemented the httpErrors and customErrors for our MVC 7.5 site. Like so:

 

     

     

     

   

 

     

     

     

     

     

     

   

 

These work fine, however as part of our testing we provided the wrong connectionString to invoke a runtime error. What happens is the error.html page is found, but strangely none of the linked Css would load. We disabled the “500” rule (still with the wrong connectionString) and tried to access the CSS file via it’s path/url, and we were presented with the “Login failed for XXXX” error message – which leads me to believe that episerver is trying to process routes for the static resources too. I tried to ignore those routes in the global class as shown below, but it didn’t seem to make any difference:

 

protected void Application_Start()

        {

            //removes X-AspNetMvc-Version HTTP Header

            MvcHandler.DisableMvcResponseHeader = true;

 

            AreaRegistration.RegisterAllAreas();

            //Tip: Want to call the EPiServer API on startup? Add an initialization module instead (Add -> New Item.. -> EPiServer -> Initialization Module)

 

            RegisterRoutes(RouteTable.Routes);

        }

 

        protected override void RegisterRoutes(RouteCollection routes)

        {

            routes.IgnoreRoute("static/css/styles.css");

            base.RegisterRoutes(routes);

        }

 

Is anyone able to provide any advice on a) whether it is a routing issue and b) how to ignore a static route?

 

Many thanks

Adam

#114504
Dec 13, 2014 12:16
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.