Skip to content

Instantly share code, notes, and snippets.

@jinan-kordab
Created November 11, 2018 14:01
Show Gist options
  • Save jinan-kordab/316a9a0e24678edfa7f2485737445a96 to your computer and use it in GitHub Desktop.
Save jinan-kordab/316a9a0e24678edfa7f2485737445a96 to your computer and use it in GitHub Desktop.
Action Result that checks for spinner token and time stats
[HttpPost]
public ActionResult CheckForSpinnerSession()
{
string returnvalue = "false";
string fileDownloadTime = "false";
if (HttpContext.Session["spinnerToken"] != null)
{
returnvalue = Session["spinnerToken"].ToString();
}
if (HttpContext.Session["timetooktodownload"] != null)
{
fileDownloadTime = HttpContext.Session["timetooktodownload"].ToString();
}
return Json(new Models.DownloadStats { FileDownloadOK= returnvalue , FileDownloadTime= fileDownloadTime});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment