private void AuthenticateIP() { dto.Login inLoginDto = GetPageValues(); LoginFacade facade = new LoginFacade(); dto.Login outLoginDto = facade.AuthenticateIP(inLoginDto); if (outLoginDto != null) { // For this sample, always set the persist flag to false. if (Request.QueryString["returnurl"] != null) { FormsAuthentication.RedirectFromLoginPage(outLoginDto.EmailAddress, false); } else { FormsAuthentication.SetAuthCookie(outLoginDto.EmailAddress, false); Response.Redirect(Pages.Home, false); } } else { LblIPAddress.Text = inLoginDto.IPAddress; } }