title: System.ArgumentNullException: Value cannot be null ASP.NET MVC5
body: <p>I have a Loan Application form, which is set to also automatically register the user as an <code>ApplicationUser</code> automatically. (It's more like an extended version of the Register Controller). I have debugged and I still get <code>System.ArgumentNullException: Value cannot be null</code> error which is pointing at a <code>BaseController (return base.BeginExecuteCore(callback, state))</code></p>
  
  <p><strong>BaseController</strong></p>
  
  <pre><code>public class BaseController : Controller
  {
      #region Protected Methods
  
      protected override IAsyncResult BeginExecuteCore(AsyncCallback callback, object state)
      {
          string cultureName = RouteData.Values["culture"] as string;
          // Attempt to read the culture cookie from Request
          if (cultureName == null)
              cultureName = Request.UserLanguages != null &amp;&amp; Request.UserLanguages.Length &gt; 0 ? Request.UserLanguages[0] : null; // obtain it from HTTP header AcceptLanguages
  
          // Validate culture name
          cultureName = CultureUtility.GetImplementedCulture(cultureName);
          if (RouteData.Values["culture"] as string != cultureName)
          {
              // Force a valid culture in the URL
              RouteData.Values["culture"] = cultureName.ToLowerInvariant(); // lower case too
              Response.RedirectToRoute("Default", RouteData.Values); // Redirect user
          }
          // Modify current thread's cultures
          Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(cultureName);
          Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
          return base.BeginExecuteCore(callback, state);
      }
  
      #endregion Protected Methods
  }
  </code></pre>
  
  <p>Inside <strong>CheckRateController</strong> inheriting from BaseController</p>
  
  <pre><code>// POST: CheckRate/Index
      [HttpPost]
      [ValidateAntiForgeryToken]
      public async Task&lt;ActionResult&gt; Index(CheckYourRateViewModel model)
      {
          if (ModelState.IsValid)
          {
              var user = new ApplicationUser
              {
                  FirstName = model.FirstName,
                  LastName = model.LastName,
                  UserName = model.UserName,
                  PhoneNumber = model.Phone,
                  DateOfBirth = model.DateOfBirth,
                  State = model.State,
                  Street = model.Street,
                  City = model.City,
                  Country = model.Country,
                  YearlyIncome = model.IndividualYearlyIncome,
                  AdditionalYearlyIncome = model.AdditionalYearlyIncome,
                  IsAdmin = YesNo.No,
                  CashBalance = 0.00M,
                  IsBorrower = YesNo.Yes,
                  RegisteredDate = DateTime.Now,
                  EmploymentStatus = model.EmploymentStatus
              };
  
              var result = await UserManager.CreateAsync(user, model.Password);
              if (result.Succeeded)
              {
                  await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false);
  
                  return RedirectToAction("Index", "Home");
              }
              AddErrors(result);
          }
  
          return View(model);
      }
  
   private void AddErrors(IdentityResult result)
      {
          foreach (var error in result.Errors)
          {
              ModelState.AddModelError("", error);
          }
      }
  </code></pre>
  
  <p>This is the screenshot of the Error: <a href="https://prnt.sc/sv0rx7" rel="nofollow noreferrer">https://prnt.sc/sv0rx7</a></p>