Tuesday, 29 September 2009

asp session and cookie variables lost in frameset

The joys of Internet Explorer...

I have an application running on IIS server, the client wanted to link to it via a masked redirect. This was put in place and tested (in Firefox on PC and Safari / Firefox on Mac). The original URL was also tested in IE.

Phone call from client saying that they can't run it or get past the login page and I find that IE is not storing the session variables when part of a frameset. Several Googles later, add this to the top of the page (or in an include for neatness):

<%
Response.AddHeader "P3P", "CP=""CAO PSA OUR"""
%>

Suddenly IE can write/read session and cookie variables without a problem! 2 hours to find the fix. 5 minutes to implement - a familiar working day?!

No comments: