我的登录方法在本地主机上运行正常,但是当我在服务器上发布时,出现 ArgumentNullException 错误mynamespase.Controllers.d__11.MoveNext() 在 E:\mylocaldirectory\myassembly\Controllers\M_AccountController.cs:179很奇怪为什么错误在服务器上显示我的本地地址以及为什么我的代码在本地主机上运行正确但在服务器上有相同代码的错误实际上,我真正的问题是这一行“E:\mylocaldirectory\myassembly\Controllers\M_AccountController.cs:179” [这是我的错误图片][ https://i.stack.imgur.com/IUBTP.jpg][HttpPost] public virtual async Task<ActionResult> Check_Code_4_Login(string code, string phoneNumber, string returnUrl) { var baseUrl = Request.Url.Scheme + "://" + Request.Url.Authority; var dtNow = DateTime.Now; var _code = Convert.ToInt32(code); var userActiveCode = await _userActiveCodeService .FindFirstAsync(p => p.PhoneNumber == phoneNumber && p.ActiveCode == _code && p.ActiveCodeExpireDate > dtNow && p.Used == false && p.Enabled); if (userActiveCode == null) { TempData["Error"] = "Code Incorrect"; return RedirectToAction(nameof(PostedLogin),new {phoneNumber=phoneNumber, reagentCode="",returnUrl="" }); } var user = await _userManager.FindByPhoneNumberAsync(userActiveCode.PhoneNumber); if (user == null) { var _user = new User { UserName = phoneNumber, PhoneNumber = phoneNumber, RegisterDate = dtNow };
- 1 回答
- 0 关注
- 116 浏览
添加回答
举报
0/150
提交
取消