Hi Dean Fiala
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
strAuthenticationType =
System.Configuration.ConfigurationSettings.AppSettings("AuthenticationType")
If strAuthenticationType = "Windows" Then
Dim ChkAuthenticate As WindowsPrincipal = New
WindowsPrincipal(WindowsIdentity.GetCurrent)
If ChkAuthenticate.Identity.Name <> "" And
ChkAuthenticate.Identity.IsAuthenticated = True Then
Session("UserId") =
Request.ServerVariables("LOGON_USER").Split("\\")(1)
Response.Redirect("AccessControl/frmDashBoard.aspx", False)
ElseIf ChkAuthenticate.Identity.IsAuthenticated = False Then
'redirect to displayerror page
Response.Redirect("AccessControl/frmdisplayerrorpage.aspx?InvalidLogin="
& 10)
End If
End If
End Sub
In the above code if the strAuthenticationType is not "Windows" then
login page is loaded to
accept user id and password
Dean Fiala <[EMAIL PROTECTED]>
Sent by: [email protected]
06/28/2005 06:21 PM
Please respond to AspNetAnyQuestionIsOk
To: [email protected]
cc:
Subject: Re: [AspNetAnyQuestionIsOk] Session Variable
Post your code
On 6/28/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Iam redirect the user from Page Load event of Login Page to
> main menu page based on some criteria.
>
> In the Page Load event of Login Page iam Initializing session variables
> but when i move to the main menu all the seesion values are null.
>
> Can any one help me on this?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> [EMAIL PROTECTED]
> Sent by: [email protected]
> 06/28/2005 10:48 AM
> Please respond to AspNetAnyQuestionIsOk
>
> To: [email protected]
> cc:
> Subject: [AspNetAnyQuestionIsOk] Session Variable
>
>
> Hi,
>
> Iam Initializing a session values in my login page.After authenicating
> the users, I will write the user details to audit table and redirect to
my
>
> main menu page. In the menu page's Load event Iam checking the suerid i
> stored in the session
> variable. It is saying "Nothing". All the session values become Null.
> Why??
>
> Regards
> Ravi
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
--
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com
Yahoo! Groups Links
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/