issues verifying if user is logged in


Posted on 16th Feb 2014 07:03 pm by admin

I am having issues when a user logs in via asp Login control, the IsAuthenticated still seems to come up false... ( yes the username and password is correct) Can anyone tell me what I might be missing ? Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
setupForm() If (Page.IsPostBack) Then
'Dim loggedIn As Boolean = HttpContext.Current.Request.IsAuthenticated
End If If (Not Page.IsPostBack) Then
Did you know?Explore Trending and Topic pages for more stories like this.
'Popup dialog won't fire if user is already in.
If (Request.IsAuthenticated) Then
mpeLogin.Enabled = False
pnLogin.Visible = False
logStatus.Visible = True
logName.Visible = True Else
mpeLogin.Enabled = True
pnLogin.Visible = True
logStatus.Visible = False
logName.Visible = False
End If
End If End Sub Private Sub setupForm() ' set the Login control properties
lgLogin.CreateUserText = _JoinNowText
lgLogin.CreateUserUrl = _JoinNowURL
lgLogin.PasswordRecoveryText = _PasswordRecoveryText
lgLogin.PasswordRecoveryUrl = _PasswordRecoveryUrl
lgLogin.InstructionText = _InstructionText
lgLogin.HelpPageText = _HelpPageText
lgLogin.HelpPageUrl = _HelpPageUrl
lgLogin.DestinationPageUrl = _DestinationPageUrl
lgLogin.RememberMeSet = _RememberMeSet
lgLogin.RememberMeText = _RememberMeText pnLogin.CssClass = _LoginPanelCss
lblBeforeButton.Text = _LoginPanelLabel
pnLogin.Width = _LoginPanelWidth End Sub
'Continue to display the popup dialog and failure text if login failed.
Protected Sub lgLogin_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles lgLogin.Authenticate
Dim name As String = HttpContext.Current.User.Identity.Name 'Add authentication logic here.
'e.Authenticated = ((lgLogin.UserName = "gbeford") And (lgLogin.Password = "spring!"))
e.Authenticated = HttpContext.Current.Request.IsAuthenticated
Dim test As Boolean = HttpContext.Current.User.Identity.IsAuthenticated
Dim isLoggedIn As Boolean = FormsAuthentication.Authenticate(lgLogin.UserName, lgLogin.Password) If (Not e.Authenticated) Then
mpeLogin.Show()
End If End Sub
No comments posted yet

Your Answer:

Login to answer
67 Like 27 Dislike
Previous forums Next forums
Other forums

Remove letter from numeric textbox
I have a textbox that will search the employee database by entering in the employee ID and it will r

Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_

how do I show what a user have selected from a checkbox?
From my code below, how would i show which check boxes have been checked and which radio buttons sel

Delete all from a table
I can not get the following code to work. If I run the sql statement in the db it will delete all t

empty() error
Why does

Code: empty($USER_ID = $_SESSION["USER_ID"])
create this error...

The IE or FF detector
Hello Friends,

Problem of today ( we seek for php help ) as following ,

we know all th

Basic Question about Threading and PHP...
I have a page that I am working on and it is taking several hours to process. The basics of what th

PHP Script runs on CLI but not through web browser
I am running into an issue that I just can't seem to find the answer to. I have a Windows Server 200

Using insert variable
need a way to inert variable data to mysql database

$acc = "212121212";
$nok =

mySQL and PHP search
Hello,
I am trying to code a project and ran into a brick wall with one of my pages. I am pretty

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash