ASP.NET Membership in an iframe

Posted on 2007-07-23
Last Modified: 2008-01-09
Is it possible to use Asp.Net membership in an iframe?
The main page A will have its own login system.  The iframe page B will also have its own login system.  The A and B talk to the same DB (and same users), so if the membership could span over the 2 pages that would be even better.  These are two separate applications so i thought this wouldnt be possible.
The login and everything is working perfectly for A and B separately, until i introduce an iframe.  It authenticates the user correctly and doesnt display an error message.  When its an invalid password it displays the error.  However it seems like the Membership wont last in B and it gets dropped automatically.  
Ive read that using session in iframes is bad if they try to use the same names (Im guessing there would be no difference in membership).  B is on the same server as A, however because its a 3rd party product, it was easier to wack it in an iframe than try to integrate two products.
Has anyone encountered something like this before?  Thanks.
Question by:UnexplainedWays
    LVL 12

    Assisted Solution

    The membership and roles setup is specifically keen to managing multiple applications and will use the same user information throughout different applications. I think, not 100% sure, but quite positive that they will need to 'register' seperately for each one though and if the username/pass isn't populated automatically for them then users may end up with a different username for one system than the other.. or you can manage the whole registration process yourself and make sure they register for both systems at once.

    For your scenario specifically it seems that you don't need to have them as seperate applications, In  a test environent you may want to try giving them the same application ID in the web.config and see how they react. Then you should only need a single login.
    LVL 16

    Accepted Solution

    Yes, it's P3P-related.

    Not easy to understand, unfortunately, it appears you need a P3P header in your responses, or a policy file on your server.

    I can't help much more, I've never needed to do it, I steer clear of IFRAMES because they're not brilliant for user-experience.

    I think you'll find it works in FireFox, as only IE has P3P set up by default.

    LVL 12

    Author Comment

    I managed to get it running when the two app's were in the same solution.  However when one was linking to another server it wouldn't work.

    I'm not a fan of iframes either but this is a concept application.

    I spent half of yesterday pulling it appart and adding it bit by bit and now the two are integrated!!!  so no more iframe and hello web control!

    Thanks for the help

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
    The viewer will learn how to dynamically set the form action using jQuery.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now