While trying to create an application for one of our resellers, I realized that session data on our side is lost when they include our application in an iframe on their site. This is because on some browsers (IE mostly), when you reference cross site pages by frames, cookies are not enabled for the site you reference. As session data is dependent on cookie, you loose session state too.
To prevent this, you should add a P3P header data to your referenced page header like below. You can add this to your global.asax for your dot net application.
1
2
3
4
| protected void Application_BeginRequest(Object sender, EventArgs e)
{
HttpContext.Current.Response.AddHeader("p3p", "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
} |
ASP.Net, Programming ASP.Net, c#, session state
Haven’t been posting lately, I have been busy with a major update for Zaplat, one of the first video sharing services in Turkey. Trying to speed things up a little bit, I have found myself struggling with AJAX updates, new video sharing features and lots of coding. I hope first beta will be available by the end of this month.
Today I have finally had some time to add the missing pages to administration pages of SheetMusicTrade, just after I realized that there are some bogus sheets added (one of them was a manual for some machine parts, I guess). I will keep an eye on the site more closely from now on.
Me and my wife had a trip to Gelibolu (Saros exactly) and had a great time there. Visited almost all of the monuments for the people died there during 1st World War and prayed for the heroes that fought like in hell without a second thought for the independent Turkey under the command of the great commander Mustafa Kemal Ataturk. Here are some photos…
Programming, Travel first world war, sheetmusictrade, trip, zaplat