title: Error: The view 'xx' or its master was not found or no view engine supports the searched locations... on logon?
body: <p>In view logon, log on with.</p>
  
  <p><strong>User</strong>: admin
  <strong>Password</strong>: xxx</p>
  
  <p>I can log in normally.</p>
  
  <p>When you try to:</p>
  
  <p><strong>User</strong>: tavaresdemelo.adv.br
  <strong>Password</strong>: xx</p>
  
  <p>The error is displayed:</p>
  
  <blockquote>
    <p>The view 'tavaresdemelo.adv.br' or ITS master was not found or the
    view engine supports the searched locations. The Following Were
    searched locations: ~ / Views / account / tavaresdemelo.adv.br.aspx ~
    / Views / account / tavaresdemelo.adv.br.ascx ~ / Views / Shared /
    tavaresdemelo.adv.br.aspx ~ / Views / Shared /
    tavaresdemelo.adv.br.ascx ~ / Views / account /
    tavaresdemelo.adv.br.cshtml ~ / Views / account /
    tavaresdemelo.adv.br.vbhtml ~ / Views / Shared /
    tavaresdemelo.adv.br.cshtml ~ / Views / Shared /
    tavaresdemelo.adv.br.vbhtml</p>
  </blockquote>
  
  <p><strong>Account Controller</strong></p>
  
  <pre><code>public ActionResult LogOn()
  {
      return View();
  }
  
  [HttpPost]
  public ActionResult LogOn(string userName, string password, string returnUrl)
  {
      if (ModelState.IsValid)
      {
          if (Membership.ValidateUser(userName, password))
          {
              FormsAuthentication.SetAuthCookie(userName, false);
              if (Url.IsLocalUrl(returnUrl) &amp;&amp; returnUrl.Length &gt; 1 &amp;&amp; returnUrl.StartsWith("/")
                  &amp;&amp; !returnUrl.StartsWith("//") &amp;&amp; !returnUrl.StartsWith("/\\"))
                  return Redirect(returnUrl);
              return RedirectToAction("Index", "Home");
          }
          ModelState.AddModelError("", "Usuário ou senha estão inválidos");
      }
  
      // If we got this far, something failed, redisplay form
      return View(userName);
  }
  
  public ActionResult LogOff()
  {
      FormsAuthentication.SignOut();
      return RedirectToAction("Index", "Home");
  }
  </code></pre>
  
  <p><strong>View Logon</strong></p>
  
  <pre><code>@model string
  @{
      ViewBag.Title = "Login";
  }
  
  &lt;div id="login"&gt;
      &lt;h2&gt;@ViewBag.Title&lt;/h2&gt;
      @Html.ValidationSummary(true, "Erro ao tentar efetuar o login.")
      @using (Html.BeginForm())
      {
          &lt;fieldset class="login"&gt;
              &lt;legend&gt;Entre com seu usuário e senha&lt;/legend&gt;
              &lt;div class="inline"&gt;
                  @Html.Label("userName", "Usuário: ")
                  @Html.TextBox("userName", Html.Encode(Model))
                  @Html.ValidationMessage("userName")
              &lt;/div&gt;
  
              &lt;div class="inline"&gt;
                  @Html.Label("password", "Senha: ")
                  @Html.Password("password")
                  @Html.ValidationMessage("password")
              &lt;/div&gt;
  
              &lt;div class="form-buttons"&gt;
                  &lt;input type="submit" class="button" value="Login" title="Login" /&gt;
              &lt;/div&gt;
          &lt;/fieldset&gt;
      }
  &lt;/div&gt;
  </code></pre>