Hi All,
I have an MVC Web Application (.Net Framework 4.7.2) hosted on MS Azure. I have a Dynamics 365 CRM instance (online) which has an iFrame. My Web Application runs inside iframe and based upon logged-in CRM's User, it creates session object and redirects the User to Dashboard of the Web Application (when the iframe is loaded) where a check is there which checks whether the Session object is null or not. After being redirected from Login page to Dashboard, the session object is found null.
Previously it was working fine but from last 15/20 days, the session is found null on Dashboard page when CRM runs in Chrome (both normal and incognito). It is still working fine with IE and Firefox but my Client uses Chrome always and is facing this issue. I also tried the same multiple times but nothing worked. I cleared all the history/cookies but the problem is still there.
I added below line in my application's Web.config file but the issue is still there.
"<sessionState cookieSameSite="None" cookieless="false" timeout="360">"
Login page Code (After authenticating logged-in CRM User):
Session["empDm"] = empDm;
return RedirectToAction("ViewDashboard", "CRMDashboard");
Dashboard page Code (ViewDashboard Action):
if (Session["empDm"] != null)
{
//---- My Code ----
}
else
return View("SessionExpired");
The above code always goes to "else" as Session["empDm"] is found null.
All suggestions are appreciated and most welcome.
Thanks in Advance..