title: ASP.NET MVC 5 app on IIS throws 500 - Internal server error
body: <p>I'm getting a 550-internal server error on all pages from a specific controller. All of the other views from other controllers gives the specific view.</p>
  
  <p>The controller a simple controller with CRUD functionality.</p>
  
  <pre><code>[Authorize(Roles = "Administrator, Supervisor, Ploeg")]
  public class DienstbulletinController : Controller
  {
      private readonly DienstbulletinAppContext _db = new DienstbulletinAppContext();
  
      // GET: Dienstbulletin
      public ActionResult Index()
      {
          var dienstbulletin = _db.Dienstbulletins.Where(a =&gt; a.Deleted == false).Include(d =&gt; d.Obp)
              .Include(d =&gt; d.Ogp).Include(d =&gt; d.Opsteller).Include(d =&gt; d.Ploeg).Include(d =&gt; d.Rechercheur)
              .Include(d =&gt; d.Voertuig);
          var data = dienstbulletin.ToList();
          return View(data.OrderByDescending(a =&gt; a.Datum.Date).ThenByDescending(a =&gt; a.ID).ToList());
      }
  
      // GET: Dienstbulletin/Details/5
      public ActionResult Details(int? id)
      {
          if (id == null) return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
          var dienstbulletin = _db.Dienstbulletins.Find(id);
          if (dienstbulletin == null) return HttpNotFound();
          return View(dienstbulletin);
      }
  
      // GET: Dienstbulletin/Create
      public ActionResult Create()
      {            
         Dienstbulletin dienstbulletin = new Dienstbulletin ()
  
          return View(dienstbulletin);
      }
  }
  </code></pre>
  
  <p>in the routes are following declared</p>
  
  <pre><code> var settings = new FriendlyUrlSettings {AutoRedirectMode = RedirectMode.Permanent};
          routes.EnableFriendlyUrls(settings);
  
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
  
          routes.MapRoute(
              "login", // Route name
              "Gebruiker/Login", // URL with parameters
              new { controller = "Gebruiker", action = "Login", id = UrlParameter.Optional }
           );
  
          routes.MapRoute(
                             name: "Default",
                             url: "{controller}/{action}/{id}",
                             defaults: new { action = "Index", id = UrlParameter.Optional }
  </code></pre>
  
  <p>Any idea on what could be wrong with this controller?</p>
  
  <p>In the eventlog on the server is no message or hint found.</p>