0

so from past few weeks i've been working on this project asp.net project which has aspx.cs and asp pages. everything was working perfectly until we enabled https suddenly sessions between aspx and asp pages stoped working. so i switch on cookies for some pages as i needed faster solution but now there this details.vb.asp page ( kind of common page ) which is getting opened from aspx and asp page and im using cookie to let the details page know the back but cookies are working in chrome but not in edge ( IEM enabled )

Private void SetCookie(string cookieName, string cookieValue, int expireDays = 30)
{
    HttpCookie cookie = new HttpCookie(cookieName);
    cookie.Value = cookieValue;
    cookie.Expires = DateTime.Now.AddDays(expireDays);
    cookie.Path = "/";

    // ✅ Important for HTTPS
    cookie.Secure = true;

    // ✅ SameSite setting — use 'None' if needed for cross-origin (e.g., frontend/backend on different subdomains)
    cookie.SameSite = SameSiteMode.Lax; // Or SameSiteMode.None if cross-site

    // ✅ Optional security
    cookie.HttpOnly = true;

    Response.Cookies.Add(cookie);
}
8
  • Please update your question giving mode detail about "sessions between aspx and asp pages stoped working". How did they stop working? Do you see any errors/exceptions anywhere? Commented Jun 4 at 10:46
  • 1
    " but not in edge ( IEM enabled )" Does this mean you're using IE Mode? If so why? Commented Jun 4 at 10:48
  • this is ancient code so when i run this on any other browser this view get distrubed also there no logs in edge but i can see them on chrome Commented Jun 5 at 4:24
  • "there no logs in edge but i can see them on chrome" Could you edit your question so that we may see what they are. Commented Jun 5 at 7:56
  • If it were me, I would be pushing to modernise the site so that it doesn't rely upon Internet Explorer. The chances are that the page would then handle the transition to HTTPS. Commented Jun 5 at 7:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.