
May 22nd, 2002, 01:19 PM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
Authentication Woes
<i><b>Originally posted by : Tim (timothy.farrell@compuware.com)</b></i><br />I am currently working with an authentication script given in the QuickStart Tutorials to learn about how I can manage access in .net.<br /><br />The problem with the script is that is only references or determines access based upon an embedded user script in the login file itself.<br /><br />Typical to M.S., how many of us out there would want to embedd 100's of uid's in the actual script file for uid, pwd verification?<br /><br />So my venture is to modify this file to include an access script to my db and an IF/Then statement to compare entered fields to records stored in my db. If the user exists and credentials met, then they are directed to default.aspx. If not, then they are sent back to the login page with explanation.<br /><br />Can anyone help with the logic of the IF/Then statement.<br /><br />Thanks very much!<br /><br />Sincerely,<br /><br />Tim<br /><br />Here is the script I have been referencing:<br /><br /><script language="VB" runat="server"><br /> Sub Login_Click(Src As Object, E As EventArgs)<br /> If UserEmail.Value = "jdoe@somewhere.com" And UserPass.Value = "password"<br /> FormsAuthentication.RedirectFromLoginPage(UserEmai l.Value, PersistCookie.Checked)<br /> Else<br /> Msg.Text = "Invalid Credentials: Please try again"<br /> End If<br /> End Sub<br /> </script>
|