title: error cannot find view MVC4 c#
body: <p>hi i made this protal which worked fine, however when i realised this to the live website i got an error saying:</p>
  
  <pre><code>   Message: The view 'EditRole' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Areas/Admin/Views/Users/EditRole.aspx  
   ~/Areas/Admin/Views/Users/EditRole.ascx ~/Areas/Admin/Views/Shared/EditRole.aspx   
  ~/Areas/Admin/Views/Shared/EditRole.ascx ~/Views/Users/EditRole.aspx ~/Views/Users/EditRole.ascx 
  ~/Views/Shared/EditRole.aspx ~/Views/Shared/EditRole.ascx ~/Areas/Admin/Views/Users/EditRole.cshtml 
  ~/Areas/Admin/Views/Users/EditRole.vbhtml ~/Areas/Admin/Views/Shared/EditRole.cshtml 
  ~/Areas/Admin/Views/Shared/EditRole.vbhtml ~/Views/Users/EditRole.cshtml 
  ~/Views/Users/EditRole.vbhtml ~/Views/Shared/EditRole.cshtml ~/Views/Shared/EditRole.vbhtml
  Source: System.Web.Mvc
  </code></pre>
  
  <p>my cshtml code:</p>
  
  <pre><code>     &lt;td&gt;@Html.ActionLink("Edit Roles", "EditRole", "Users", new { roleId = r.RoleID }, new { @class = "action" }) &lt;/td&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>         [HttpPost]
      public ActionResult EditRole(Role role)
      {
          try
          {
              if (ModelState.IsValid)
              {         
              }
              return RedirectToAction("EditRole");
          }
          catch
          {
              return RedirectToAction("EditRole");
          }
      }
  </code></pre>
  
  <p>Problem is, when i run it on local host everything works! but when i put it on the server its giving me the error.</p>
  
  <p>Any ideas?</p>
  
  <p>one thing iv noticed in the error is, it says:</p>
  
  <pre><code> The following locations were searched: ~/Areas/Admin/Views/Users/EditRole.aspx
  </code></pre>
  
  <p>But it should be, EditRole.cshtml
  But am not sure why its saying EditRole.aspx when there is no such thing.</p>