404 Http error handler in Asp.Net MVC (RC 5)

http://jason.whitehorn.ws/2008/06/17/Friendly-404-Errors-In-ASPNET-MVC.aspx gives the following explanation: Add a wildcard routing rule as your final rule: routes.MapRoute(“Error”, “{*url}”, new { controller = “Error”, action = “Http404” }); Any request that doesn’t match another rule gets routed to the Http404 action of the Error controller, which you also need to configure: public ActionResult Http404(string url) { Response.StatusCode = … Read more

Django staticfiles app help

I implore you to read the howto docs here: http://docs.djangoproject.com/en/dev/howto/static-files/ In short: STATIC_ROOT is only used if you call the collectstatic manangement command. It’s not needed to add the directory to the STATICFILES_DIRS setting to serve your static files! During development (when the automatic serving view is used) staticfiles will automatically look for static files … Read more

Spring Java Config vs Jboss 7

I was using @SpringBootApplication As I read in this thread I needed to: Change the mapping of the DispatcherServlet to “/*” instead of “https://stackoverflow.com/” (by adding a @Bean of type ServletRegistrationBean with a servlet named “dispatcherServlet”) In this url I found the code solution: Add Servlet Mapping to dispatch servlet @SpringBootApplication public class Application extends … Read more

IIS7 custom 404 not showing

answer was to use <httpErrors existingResponse=”Replace” errorMode=”Custom”> <remove statusCode=”404″ subStatusCode=”-1″ /> <error statusCode=”404″ prefixLanguageFilePath=”” path=”/pages/404.aspx?he” responseMode=”ExecuteURL” /> </httpErrors> and not to have any system.web customErrors this worked for both .aspx and non .aspx requests. bizarrely this combination did not come up in any of the blog posts and stackoverflow answers I had investigated, it was … Read more