Login Control logs user in, but User is not authenticated, but user really is!

I am using aspnetmembershipprovider.  Everything works fine.  I slap a login control on my login page and am able to login and get to my secure folder etc.

 When I try and put some code in the LoggedIn method "User.Identity.IsAuthenticated" = false, yet if I blow through that, I am logged, authenicated etc.  The documentation says that the LoggedIn event is "after the user is authenticated".

 Any Ideas what is up?


Thanks,
TPS

------------------------------------------------------
Note Collaboration for your next confernce call.
http://www.ConferenceCallNotes.com
0
TPS
12/19/2006 10:14:45 PM
asp.net.security 27051 articles. 0 followers. Follow

2 Replies
484 Views

Similar Articles

[PageSpeed] 59

I am not sure what you want exactly to achieve.

If you want to change way the user is authenticated, change event:

Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs)

if you setup:

e.Authenticated = true

that means that authentication is ok and that user is authenticated.


Regards,
Dejan Vesić

MCAD for .Net technologies | http://www.vesic.org/english/ | Blog: http://www.vesic.org/english/blog/
0
Dejan
12/19/2006 11:30:26 PM

I figured it out.  The cookie has not been inserted in the browser yet because a round trip from the server to the user back to the server has not happened. 

 Thanks for your reply.


Thanks,
TPS

------------------------------------------------------
Note Collaboration for your next confernce call.
http://www.ConferenceCallNotes.com
0
TPS
12/20/2006 3:17:15 PM
Reply:

Similar Artilces:

Login control authenticates user and redirects, but does not log user in
I am trying our the "SQLite 3.0 Membership and Role Provider for ASP.NET 2.0" found here: http://www.eggheadcafe.com/articles/20051119.asp since I do not have access to a SQL server. However I have run into a problem where the login control authenticates the user, then redirects to the redirect page, but ASP.NET detects the user as not logged in. One weird thing I noticed is that on the redirect page there is a check: if(Page.User.Identity!=null) this.Label1.Text = "Welcome," + Page.User.Identity.Name + "!"; The label control displays "Welcome, !" meaning the login c...

A user control to authenticate users
Hi all I have a simple user control..with two textboxes(Email and Password) and a button and two links (Forgot your password & To  register click here) ... i'm using windows forms ... when the sign in button is clicked ...i'm trying to validate user credentials against a database..if valid..i instantiate a new principal object ...and place it in the Context.User   string encPassword = new User().Encrypt(txtPassword.Text); MySitePrincipal newUser = MySitePrincipal.ValidateLogin( txtEmailAddress.Text, encPassword); if (newUser != null) { Context.User = newUser; Response....

User Control in a User Control
I have a first user control that contain a second user control. If I cahe the first user control can I still dynamically control the second one or it is cached with the first one therefore can not control it anymore? Thanks When your first control is cached, its rendered out and its output is stored in the cache. On every request to the page containing your control that can satisfy it from cache, the output will just simply be inserted - your first control will never be instantiated or run in that case, so the second one wont be either. Hope this helps,Mike VolodarskyProgram Manager...

user control to user control
I have an aspx page that have a "Register" directive to two usercontrol called rptMaster.ascx and rptDetail.ascx. I'm trying to set up a Master-Detail relationship and wish for the rptMaster.ascx to trigger and event from a dropdownlist and for the rptDetail to be listening for DropDownList event. I believe I have gotten the events part okay with help from this articel http://codeproject.com/aspnet/Page_UserControl.asp but my declaration for a private statement to my rptMaster class is producing an error. I'm using beta 2 of asp.net and I 'm having trouble getting a reference TO ...

User Controls in User Controls?
I have the follow set up and it is throwing an error "Unhandled error loading module" ... is there some trick to this that I don't know?I have a project A that uses controls from project B (project B is just a project with all my user controls used through out other modules).  project A uses user control 1 from project B with out any issues at all - great.  But then I wanted to add user control 2 to user control 1 and that is when I get my error.  In fact I don't even have the user control 2 in user control 1, just when I put the register part into user control 1 is when it al...

User control in a user control
Hello all, I have created a user control with some checkboxes, and public properties to get the values of these checkboxes. I have also created a second user control using the first user control; this second control also access the public properties of the first one. My problem is when I implement the second control in an aspx page, if I click at runtime the checkboxes in the first control, I am able to access its public properties from the methods of the second control but the values of these properties are wrong. while at design time, I do not have this problem. Than...

Creating a user to login with using the Login Control and the Ad provider... can't log user in after creation
  Hi I'm trying to create a user in AD from a web form, and then have the user be able to login to a web form with the login control and the Ad provider.   I have a user created by someone else in AD that can log in, but when I create the user using the code below they can't login.   Does anyone have any idea what I'm not doing to enable this user correctly, hes in the same ou and the same groups as the user that can login. the only difference i can see is the display name is not set and the AdminCount has not been set yet...&n...

Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)
Hi when i try and open a database in sql server management studio i get the error "Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)", what can i do to rectify this, i have googled around and still havent found no answers. Which authentication mode is your Sql Server configured - MixedMode, Windows Authentication or Sql Server Authentication? Please refer to http://msdn2.microsoft.com/en-us/library/ms366351.aspx and http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx    Ple...

Users logging in as the same user..
HI there.. I have a problem with ASE12.0 .. I have created 10 users on the database and granted everybody permissions and all.. However, it seems everybody, no matter who logs in, logs in as the same user.. For eg... I have user logins John, Alex, Alan, Steve......etc etc And i created a user group for all of them (eg developers..) However, when they log on to isql, anything that they do will be under John, no matter if it is logins John, Alex, Steve... or etc etc.. If i do a sp_who.. all the connections will be listed as John. If they create tables, all table created will ...

Will the login control update User's lastactivitydate when logging user in?
After a user logged in, I want to check his lastactivitydate. But I don't know whether the login control I use will update user's lastactivitydate automatically when athenticating user.If the log in control does, that means I always get DateTime.Now if I retrieve user's lastactivitydate just after his log in.I searched MSDN, it doesn't seems there is an answer yet. Welcome to My Blog:.Net Framework Student I guess so, but before login you have the username. Thus you can retrieve user information before the user thechnically logs in.Please remember to 'Mark as Answe...

Unable to access user control's user control's function\property from another user control
Hi, I used to call an user control's user control function as stated below from my user control in ASP.Net 1.1 wucCompany.wucEmployee.GetEmployeeSomething() After migrating to ASP.Net 2.0, I am unable to use any properties/functions(even the public ones) of the user control's User control's from another user control.  The way I have to do is create property\function in wucCompany which calls the wucEmployee's property\function and call the wucDepartment.GetEmployeeSomething().Since I need to do this change in too many places, I can...

Raiseevent user control in user control
 Hi there, I am working on a project in which a user control (BedrijfMasterDatagrid.ascx) is creating an other user control (BedrijfDatagrid.ascx).The user control BedrijfDatagrid.ascx is correctly created, but the clicked event of the created image control (BedrijfDatagrid.ibImageButtonClicked ) is not fired. (see BedrijfDetail.aspx)When I place BedrijfDatagrid.ascx directly on the page the event is correctly fired. Summary:BedrijfMasterDatagrid.ascx:       Datagrid with 1 row in which BedrijfDatagrid is dynamically createdBedrijfDatagrid.ascx  ...

user control inside a user control
i've currently got one of my pages setup so that I have a user control, CreateMessage.ascx, inside my main user control, ViewChangeMessages.ascx. My problem is that i've got a method inside my main usercontrol that either hides or shows the second user control, but it doesn't work, mainly coz i found out that the second user control is loaded before my main one. Is there any way i can get around this? You could try to load the second user control programmatically the OnPreRender method of your main user control. You'll need to add a placeholder in the spot you want the user control to...

Referencing User Control In Some Other User Control
hi, I have two user controls namely CanvasGrid.ascx and GridUtility.ascx. CanvasGrid.ascx is just a container for displaying GridView control in a placedholder GridPH. I want to get the checked rows from GridView control of CanvasGrid.ascx and do tagging against specific name selected from the TagDropDownList of GridUtility.ascx. But the problem is that I am not geting the reference of GridView as it is coming null everytime even when I am using FindControl() to find the GridView control on the page. GridUtility.ascx is a part of CanvasGrid.ascx and it is placed in a placehol...

Web resources about - Login Control logs user in, but User is not authenticated, but user really is! - asp.net.security

Authenticated encryption - Wikipedia, the free encyclopedia
Authenticated Encryption ( AE ) or Authenticated Encryption with Associated Data ( AEAD ) is a block cipher mode of operation which simultaneously ...

Google Spam Report (Authenticated) - Flickr - Photo Sharing!
When you are logged into Google Webmaster Central, you can report any site that is spamming the SERPs through this tool. Post at Does Google ...

Authenticated electricity: Sony power outlets will charge you for charging
Sony is building a new kind of power outlet that raises a not entirely pleasant prospect—in the future, plugging a phone into a public wall socket ...

MLB Authenticated Game-Used Base Bar Stool
Like. From The Green Head: "If you love America's favorite pastime, now you can sit on an actual piece of it. These unique collectible bar stools ...

C-SPAN Moving to Authenticated TV Ch. Streaming
C-SPAN is launching a beta test of its migration of live online feeds of its TV channels—C-SPAN 1,2,3—to an authentication model starting Monday, ...

FDA "Corruption" Letter Authenticated: Lawyers, Start Your Engines!
The FDA's official recognition of the letter means that lawyers who want to use it to demonstrate that the FDA isn't perfect won't have to go ...

Buddy Rich's Authenticated and Complete 1960s Zildjian Cymbal Set Available on eBay for $29,995
Buddy Rich's complete 1960s Zildjian cymbal set is available for purchase on eBay. In the massive world of the Internet, anything is apparently ...

FileVault's authenticated restart has hardware requirements
If you use FileVault and wish to restart remotely, you can do so with the 'fdesetup' command; however, this does have some hardware limitations. ...

BREAKING: Michael Brown Audio Aired By CNN Authenticated
Video messaging service Glide has confirmed to the Washington Post the exact time and date the audio recording with gunshot sounds on it was ...

Sheriff: Brenham vet can't be charged with killing cat unless Facebook photo is authenticated
As a team investigated the image, the clinic where Kristen Lindsey worked said Friday that she'd been fired and condemned her post "in the strongest ...

resources last updated: 11/20/2015 1:12:43 PM