Session ID changes when sendSmsRandomPass is called from angular side.
I tried solving according to this post and others but to no avail: [https://stackoverflow.com/questions/2874078/asp-net-session-sessionid-changes-between-requests]
Does anyone have any ideas why it doesn't work
public void sendEmail()
{
if (HttpContext.Current.Session != null)
{
HttpContext.Current.Session["phoneSMSForSendPassword"] =
phoneSMSForSendPassword;
HttpContext.Current.Session["password"] = password;
}
sendSmsRandomPass();
sendoffice365();
}
public void sendSmsRandomPass() {
if (password == null && phoneSMSForSendPassword == null &&
HttpContext.Current.Session != null)
{
phoneSMSForSendPassword =
(string)HttpContext.Current.Session["phoneSMSForSendPassword"];
password = (string)HttpContext.Current.Session["password"];
}
SMS.sendSMS(phoneSMSForSendPassword, password );
}