Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > FormsAuthentication problem with popup login window

Thread Tools

FormsAuthentication problem with popup login window

Mark Farragher
Posts: n/a
I have a problem with FormsAuthentication:

I have two web applications:

I have a 'login' hyperlink in MyApp that opens
http://localhost/bx/authentication/login.aspx in a popup window. The popup
window has a username and password text field and an ok button. The
code for the ok button is:

FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
1, txtUID.Text, DateTime.Now, DateTime.Now.AddMinutes(30), false,
string ticketstring = FormsAuthentication.Encrypt(ticket);
HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName,

The web.config file in both applications has an authentication section:

<authentication mode="Forms">
<forms name="BXAuthentication" protection="All" />

This does not work. User.Identity is always null in MyApp. The weird thing
is that when I add this code to MyApp's Page_Load method:


I can actually see the serialized login ticket!! So the cookie is passed
correctly from the popup window to MyApp, but somehow this does not count
being authenticated. How can I get MyApp to 'accept' the cookie? What am I
missing? Is authentication accross AppDomains possible at all?

Thanks for any help,


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Popup Window Popup Timing =?Utf-8?B?Sm9obiBXYWxrZXI=?= ASP .Net 3 11-04-2005 07:33 PM
Redirecting to login page from a popup window. =?Utf-8?B?S2FseWFuaQ==?= ASP .Net 1 06-21-2005 09:21 AM
New Popup Window from an existing Popup Window Raffi Javascript 4 08-12-2004 01:21 PM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM
FormsAuthentication problem with popup login window Mark Farragher ASP .Net Security 1 09-28-2003 11:52 PM