2016-11-29 1 views
0

ASP.Net MVC 응용 프로그램이 있습니다. 최근 올바르게 작동하고 나는 그것을 실행하고 입력 할 때 지금은 시간이 오래 걸려와처리되지 않은 'System.StackOverflowException'형식의 예외가 App_Web_1wvcoe1q.dll에서 발생했습니다.

가 'System.StackOverflowException' 유형의 처리되지 않은 예외가 App_Web_1wvcoe1q.dll에서 발생

나 '라고 로그인 자격 증명을 모든 ASP.Net 임시 파일과 Visual Studio 임시 파일을 지워서 많은 노력을했습니다.

하지만 여전히 동일한 문제가 있습니다. 로그인 페이지에서 내 코드에 문제가 없다고 생각합니다. 갑자기 이런 일이 일어났습니다.

는 로그인 방법

[HttpPost] 

     public ActionResult LogIn(string loginId, string password, string plantCode, string returnUrl) 
     { 
      bool valid = false; 

      if (loginId.IsEmpty()) 
      { 
       ViewBag.ErrorMessage = "Login id cannot be empty"; 
      } 
      else if (password.IsEmpty()) 
      { 
       ViewBag.ErrorMessage = "Password cannot be empty"; 
      } 
      else if (plantCode.IsEmpty()) 
      { 
       ViewBag.ErrorMessage = "Plant code cannot be empty"; 
      } 
      else 
      { 
       //Domain 
       using (var context = new PrincipalContext(ContextType.Domain)) 
       { 
        valid = context.ValidateCredentials(loginId, password); 
       } 
       //Domain 

       //Cloud 
       //valid = true; 
       //Cloud 

       var user = ValidateUserPlant(loginId, plantCode); 
       if (valid && user != null) 
       { 
        FormsAuthentication.SetAuthCookie(loginId, true); 
        Session[ConstantVariables.SessionVariables.Password] = password; 
        Session[ConstantVariables.SessionVariables.LoginId] = loginId; 
        Session[ConstantVariables.SessionVariables.PlantId] = user.PlantId; 
        Session[ConstantVariables.SessionVariables.UserId] = user.Id; 
        Session[ConstantVariables.SessionVariables.Email] = user.Email; 
        Session[ConstantVariables.SessionVariables.UserName] = user.Name; 
        Session[ConstantVariables.SessionVariables.UserData] = user; 
        Session[ConstantVariables.SessionVariables.UserName] = user.Name; 
        Session[ConstantVariables.SessionVariables.DepartmentId] = user.DepartmentId; 
        Session[ConstantVariables.SessionVariables.ProductionSectionId] = user.ProductionSectionId; 
        return Redirect(Url.RouteUrl(new { controller = "Home" }) + returnUrl); 
       } 
       else 
       { 
        ViewBag.ErrorMessage = "Invalid User Name or Password"; 
       } 
      } 

      return View("Index"); 
     } 

그리고 호출 스택의 위치

enter image description here

나는이 문제가 비주얼 스튜디오 2012 생각 비주얼 스튜디오 2012

답변

0

을 사용하고 있습니다 .

일단 설치하면 Visual Studio 2012 업데이트 5 문제가 해결되었습니다.

관련 문제