Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
I've googling for 5 hours now and i become mad... if anyone have a idea it should be great.
I'm using page method in my asp c# pages like this :

[WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static string GetUrl(string idSession)
{
string IdStructureString = System.Web.HttpContext.Current.Session["idstructure"].ToString();
... stuff ...

}
every thing is working fine but when 1/ using Safari (with default options: not enable third party) and when 2/ my page is called in an iframe (main page in another domain) System.Web.HttpContext.Current.Session is null and stuff is not done.

It seem that Safari don't enable cookies in a called iframe since user interact with it -> can't retrieve session variables (in my case, webuser interact with it)
The strange is that in my page_Load or other classics methods, session variables are correcty filled but not when inside my webmethod.
I've been working with 3P policies or made others tries but nothing is working. Any idea ?

Thanks a lot !
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900