title: Removal of AntiForgeryToken from MVC 4 project in VS 2012
body: <p>I have a problem with a project which I have had undertaken by a subcontractor and am hoping someone on here can help me get this rectified.</p>
  
  <p>The project in question is an MVC4 project built with the ASP.Net MVC4 Web App template under VS 2012 and connects to a SQL 2012 database.</p>
  
  <p>I have been given all of the files which were created during the project, but have been unable to log in to it (even within VS) as it rejects all log in attempts due to a problem somewhere within the code.</p>
  
  <p>I can verify the database connection by removing Html.AntiForgeryToken() from login.cshtml and I get presented with an error screen with the error System.Web.Mvc.HttpAntiForgeryException: The required anti-forgery form field "__RequestVerificationToken" is not present. </p>
  
  <p>If the Html.AntiForgeryToken() is left in place the page loops back onto itself with an error stating that the login failed an to try again - the same error which is returned with an incorrect username and password. I should also mention that I saw this working on his own machine prior to him giving me the project files.</p>
  
  <p>I have been able to verify the accounts which I am using to authenticate to the web app with are correct by connecting to the same database using <a href="http://www.codeproject.com/articles/482546/Creating-a-custom-user-login-form-with-NET-Csharp" rel="nofollow">this walkthrough</a>  </p>
  
  <p>This web app will be used solely on an closed network off the grid for the foreseeable future, so data security in transit isn't an issue at the moment (and I will deal with it later if it does become a problem). </p>
  
  <p>Simply put, I want to know if there is a way to disable anti forgery verification altogether or if there is some code I can search for and comment out to get this functional.</p>