Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


ASP.NET Membership in an iframe

Posted on 2007-07-23
Medium Priority
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

lunadl earned 600 total points
ID: 19556835
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

LeeKowalkowski earned 1400 total points
ID: 19563570
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

ID: 19570846
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Suggested Courses
Course of the Month15 days, 23 hours left to enroll

581 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