public IActionResult Index() { if (string.IsNullOrEmpty(Request.Query["appUrl"]) && string.IsNullOrEmpty(Request.Query["operation"])) { TempData["Message"] = "Sorry something went wrong, please try again!"; //"Required parameters not found, please initiate the request from the application."; return(View("~/Views/Error.cshtml")); } if (!Uri.IsWellFormedUriString(Request.Query["appUrl"].ToString(), UriKind.Absolute)) { TempData["Message"] = "Sorry something went wrong, please try again!"; //"path parameter is not a valid Url, please initiate the request from the application."; return(View("~/Views/Error.cshtml")); } string operation = Request.Query["operation"].ToString().ToUpper(); string encryptedStr = dp.ProtectStr(Request.Query["appUrl"].ToString()); if (operation == "EDIT_PROFILE") { return(RedirectToAction("EditProfile", "Profile", new { key = encryptedStr })); } else if (operation == "CHANGE_PWD") { return(RedirectToAction("ChangePassword", "Profile", new { key = encryptedStr })); } else { TempData["Message"] = "Sorry something went wrong, please try again!"; //"operation value is not valid, please initiate the request from the application."; return(View("~/Views/Error.cshtml")); } }
public IActionResult Index() { if (string.IsNullOrEmpty(Request.Query["path"])) { TempData["Message"] = "Sorry something went wrong, please try again!"; //"Required parameters not found, please initiate the request from the application."; return(View("~/Views/Error.cshtml")); } if (!Uri.IsWellFormedUriString(Request.Query["path"].ToString(), UriKind.Absolute)) { TempData["Message"] = "Sorry something went wrong, please try again!"; //"path parameter is not a valid Url, please initiate the request from the application."; return(View("~/Views/Error.cshtml")); } string encryptedStr = dp.ProtectStr(Request.Query["path"].ToString()); return(RedirectToAction("SignUp", "Registration", new { key = encryptedStr })); }