이 메서드는 필요한 페이지에서만 호출합니다. Json data를 이용하는 로직이 있으므로 Ajax의 결과 페이지에서는 사용하지 않아야 합니다.
public ActionResult Index()
{
try
{
HomeIndexViewModel model = new HomeIndexViewModel();
AuthCheck authCheck = new AuthCheck(Request, Response);
AuthStatus status = authCheck.CheckLogon();
if (status == AuthStatus.SSOSuccess)
{
authCheck.CheckHijacking();
}
return View(model);
}
catch(AgentException agentException)
{
HomeIndexViewModel errModel = new HomeIndexViewModel();
errModel.ErrorCode = agentException.ExceptionCode.ToString();
return View(errModel);
}
}