Click here to Skip to main content
15,609,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I created my web application in when It is hosted on a domain ( but when I embed my web application ( in the iframe of another domain( then it lost the session. what I have to do so the session will not be lost or expire?

What I have tried:

In your golbal.asax.cs set X-Frame-Options to AllowAll:

 protected void Application_PreSendRequestHeaders()
    Response.AddHeader("X-Frame-Options", "AllowAll");

but it doesn't work. how can I allow others to iframe my website and also session will not lost their value .

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