title: Null Reference Exception on scaffolded Identity Login page
body: <p>My project is ASP.Net MVC5 and uses ASP Identity. I ran the scaffolding commands and have made minor changes to the view layouts. I recently noticed that when the login page loads, during debugging, I get the error below:
  <a href="https://i.stack.imgur.com/nExe3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nExe3.png" alt="enter image description here" /></a></p>
  <p>I haven't changed the controller and I'm not sure how the exception is being thrown as the the page loads fine if you continue and the login functions normally.</p>
  <p>The unmodified controller code is below:</p>
  <pre><code>//
  // GET: /Account/Login
  [AllowAnonymous]
  public ActionResult Login(string returnUrl)
  {
      ViewBag.ReturnUrl = returnUrl;
      return View();
  }
  </code></pre>
  <p>I must point out that this only occurred after adding DevExpress into the project but DevExpress support insists this is not expected behaviour.</p>
  <p>How would I begin to trace something like this? What is null? Clicking &quot;View Details&quot; on the error dialog doesn't show an inner exception and the StackTrace is <code>null</code>, the source is <code>Anonymously Hosted DynamicMethods Assembly</code>.</p>