title: Could not load file or assembly 'mysql.web' or one of its dependencies. The system cannot find the file specified
body: <p><img src="https://i.stack.imgur.com/gzj9e.png" alt="enter image description here">Here i am creating login page to check validateUSer but i got exception: Here i posted my full code please check it once... </p>
  
  <p>enter code here</p>
  
  <p>namespace Loginusingmvc.Controllers
   {
     public class LoginController : Controller
  {
      //
      // GET: /Login/</p>
  
  <pre><code>public ActionResult Index()
  {
      return View();
  }
  [HttpGet]
  public ActionResult LogIn(string returnUrl = "")
  {
      if (User.Identity.IsAuthenticated)
      {
          return LogOut();
      }
  
      ViewBag.ReturnUrl = returnUrl;
      return View();
  }
  
  // [HttpPost]
  public  bool ValidateUser(string UserID, string Password)
  {
      if (string.IsNullOrEmpty(UserID) || string.IsNullOrEmpty(Password))
          return false;
  
      using (ntc_salesEntities context = new ntc_salesEntities())
      {
          var user = (from u in context.user_master
                      where String.Compare(u.UserID, UserID, StringComparison.OrdinalIgnoreCase) == 0
                            &amp;&amp; String.Compare(u.Password, Password, StringComparison.OrdinalIgnoreCase) == 0
                       select u).FirstOrDefault();
  
          return user != null;
      }
  }
  
  [HttpPost]
  public ActionResult Login(user_master model, string returnUrl = "")
  {
      if (ModelState.IsValid)
      {
          if (Membership.ValidateUser(model.UserID,model.Password))
          {
              FormsAuthentication.RedirectFromLoginPage(model.UserID,false);
              return RedirectToAction("Index", "Login");
          }
          else
          {
              ModelState.AddModelError("", "Login details are wrong.");
          }
  
      }
      return View(model);
  
  }
  
  
  public ActionResult LogOut()
  {
      FormsAuthentication.SignOut();
      return RedirectToAction("Index", "Login");
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>    Route:
  
     routes.MapRoute(
              name: "Default1",
              url: "{controller}/{action}/{id}",
              defaults: new { controller = "Login", action = "Login", id = 
                UrlParameter.Optional }
          );
  </code></pre>
  
  <p>Html</p>
  
  <pre><code>    @model Loginusingmvc.Models.user_master
  
  @{
     ViewBag.Title = "LogIn";
     Layout = "~/Views/Shared/_Layout.cshtml";
  }
  
  &lt;h2&gt;LogIn&lt;/h2&gt;
  
  
      @Html.ValidationSummary(true, "Login Failed, check details")
  
  &lt;div&gt;
         @using (Html.BeginForm("Login", "Login", new { returnUrl = Request.QueryString["returnUrl"] }, FormMethod.Post))
          {
  
      &lt;fieldset&gt;
          &lt;legend&gt;Login Form&lt;/legend&gt;
          &lt;div class="editor-label"&gt;@Html.LabelFor(u=&gt; u.UserID)&lt;/div&gt;
          &lt;div class="editor-field"&gt;@Html.TextBoxFor(u=&gt; u.UserID)
              @Html.ValidationMessageFor(u=&gt; u.UserID)
          &lt;/div&gt;
          &lt;div class="editor-label"&gt;@Html.LabelFor(u=&gt; u.Password)&lt;/div&gt;
          &lt;div  class="editor-field"&gt;@Html.PasswordFor(u=&gt; u.Password)
              @Html.ValidationMessageFor(u=&gt; u.Password)
          &lt;/div&gt;
  
          &lt;input type="submit" value="Log In" name="Login" /&gt;
  
      &lt;/fieldset&gt;
      }
  &lt;/div&gt;
  </code></pre>
  
  <p>web.config</p>
  
  <pre><code>    &lt;connectionStrings&gt;
      &lt;add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-Loginusingmvc-20140516104010;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-Loginusingmvc-20140516104010.mdf" providerName="System.Data.SqlClient" /&gt;
  &lt;add name="LoginEntities" connectionString="metadata=res://*/Models.Login.csdl|res://*/Models.Login.ssdl|res://*/Models.Login.msl;provider=MySql.Data.MySqlClient;provider connection string=&amp;quot;server=206.225.85.212;user id=ntc;password=NTC@123;database=ntc_sales&amp;quot;" providerName="System.Data.EntityClient" /&gt;
  &lt;add name="ntc_salesEntities" connectionString="metadata=res://*/Models.Model1.csdl|res://*/Models.Model1.ssdl|res://*/Models.Model1.msl;provider=MySql.Data.MySqlClient;provider connection string=&amp;quot;server=;user id=ntc;password=NTC@123;database=ntc_sales&amp;quot;" providerName="System.Data.EntityClient" /&gt;
  &lt;add name="DAConnection" connectionString="Data Source=;user id=;database=" providerName="MySql.Data.MySQLClient" /&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>   &lt;membership defaultProvider="MySqlMembershipProvider"&gt;
    &lt;providers&gt;
      &lt;clear/&gt;
      &lt;add name="MySqlMembershipProvider" 
           type="System.Web.Security.SqlMembershipProvider,mysql.web" connectionStringName="DAConnection"
           enablePasswordRetrieval="false"
           enablePasswordReset="true" 
           requiresQuestionAndAnswer="false" 
           requiresUniqueEmail="true"
           passwordFormat="Hashed"
           maxInvalidPasswordAttempts="5" 
           minRequiredPasswordLength="6" 
           minRequiredNonalphanumericCharacters="0" 
           passwordAttemptWindow="10"
           applicationName="/" 
           /&gt;
    &lt;/providers&gt;
  &lt;/membership&gt;
  
    &lt;roleManager enabled="true" defaultProvider="MySqlRoleProvider"&gt;
    &lt;providers&gt;
      &lt;clear /&gt;
      &lt;add connectionStringName="MySqlMembershipConnection"
          applicationName="/"
          name="MySqlRoleProvider"
          type="MySql.Web.Security.MySQLRoleProvider, mysql.web"
          autogenerateschema="true"/&gt;
    &lt;/providers&gt;
  &lt;/roleManager&gt;
  
  
  &lt;profile&gt;
    &lt;providers&gt;
      &lt;clear/&gt;
      &lt;add type="MySql.Web.Security.MySqlProfileProvider, mysql.web"
            name="MySqlProfileProvider"
            applicationName="/"
            connectionStringName="MySqlMembershipConnection"
            autogenerateschema="true"/&gt;
      &lt;remove name="MySQLProfileProvider" /&gt;
    &lt;/providers&gt;
  &lt;/profile&gt;
  </code></pre>