Archive

Archive for September, 2009

Session is lost when including a page in frame from another site

September 30th, 2009

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 , ,

New site for Zaplat and a trip to Gelibolu

September 24th, 2009

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.

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 , ,