ELMAH: Elmah pages are not in style, which makes them difficult to read

Setup:

I have ELMAH installed through NuGet on an ASP.NET MVC 4 site.

On the dev machine, the application is installed in the root. All this works and is presented as usual in ELMAH pages. This is always the case, work on the dev machine, I mean, right?

But on the server, the application is installed in a subfolder (~ / tracker). Although ELMAH works fine, the pages are not too long, which makes them difficult to read.

Question:

What do I need to make the pages become styles?

Presumably, the styling comes from a resource that can be configured in the web.config file. But how?

Edit:

I found that I have a very important error:

System.Web.HttpException: A public action method 'stylesheet' was not found on controller 'Elmah.Mvc.ElmahController'. 

The path is given as:

 /tracker/elmah/stylesheet 

This is obviously due to the Link tag in the ELMAH page source:

 <link rel="stylesheet" type="text/css" href="/tracker/elmah/stylesheet" /> 

But how do I configure this URL?

+7
source share
1 answer

What is your "elmah.mvc.route" setting? Can you see the elmah screen if you remove "/ tracker" from your path?

Based on the window, setting up the elmah route:

 <add key="elmah.mvc.route" value="elmah" /> 

You need to be

 <add key="elmah.mvc.route" value="tracker/elmah" /> 

Your route configuration correctly redirects requests for controller actions, but elmah prints the style sheet address itself without using the route configuration, so you need to specify which route / URL to use for your links.

+6
source

All Articles