Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > passing user name info to protected page

Reply
Thread Tools

passing user name info to protected page

 
 
jason@cyberpine.com
Guest
Posts: n/a
 
      10-03-2003
Hello.

Newbie question I'm sure.

I've got this page I am securing with a password using a simple
LOGIN.ASPX page:

<%@ Page Language="VB" %>
<script language="VB" runat="server">

Sub btnLogin_OnClick(Src As Object, E As EventArgs)
If txtUsername.Text = "passwordhere"
FormsAuthentication.RedirectFromLoginPage(txtUsern ame.Text, True)
Else
lblInvalid.Text = "Sorry... try again..."
End If
End Sub

</script>

.... more html here

and the WEB.CONFIG PAGE:

<configuration>
<system.web>
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms name="FNAME" loginUrl="login.aspx" />
</authentication>

</system.web>
<location path="protectedpage.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>

</configuration>
==

Nothing too fancy ... I'd like a few more users and then pass the
protected page a session variable (maybe) with the valid username.

How would/could I do this?

Many thanks for any info or help.
 
Reply With Quote
 
 
 
Reply

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
user.identity.name returns old AD user name Antonio O''Neal ASP .Net Security 5 11-03-2008 12:27 PM
HttpContext.Current.User.Identity.Name AND Context.User.Identity.Name; nalbayo ASP .Net 2 11-11-2005 11:12 PM
Page.User.Identity.Name vs. WindowsIdentity.GetCurrent().Name Shary ASP .Net Security 3 12-14-2004 01:04 PM
Passing database info to page allow user input then pass into another database Renie83 ASP General 2 07-14-2003 05:30 PM
Difference between "Protected WithEvents myClassName" And "Protected myClassName" ? Andreas Klemt ASP .Net 2 07-05-2003 12:51 AM



Advertisments