سؤال

elmah is emailing me exceptions for missing controllers like so:

System.Web.HttpException: The controller for path '/Scripts/modernizr-2.0.6-development-only.js' was not found or does not implement IController.

I added some ignore routes to try and let the app know that scripts isn't a controller and to ignore all .js and .css files like so:

    routes.IgnoreRoute("scripts/*");
    routes.IgnoreRoute("*.js|css");

It's still emailing me the exception. at this point I want to just suppress the error because every single time I hit a page on the app, it triggers this email.

any suggestions to cure this?

هل كانت مفيدة؟

المحلول

Check that the script it is looking for actually exists in the site. I have had problems like this reported in Elmah, and as I remember, it was after a js library had been updated by NuGet, but the references in the views had not.

Hope that helps.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top