Re: SQL2K and .NET
From: Etienne Charland (firstname.lastname@example.org)
From: "Etienne Charland" <email@example.com> Date: Thu, 13 Mar 2003 15:35:12 -0500
There are several good ways to implement authentication.
1) You can use Windows Integrated Security, and use system accounts
2) You can implement custom authentication...
Private Sub Login_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Login.Click
If AuthenticateUser(txtUser.Text, txtPass.Text) Then
lblErreur.Visible = True
(add the AuthenticateUser function, wich will check in a database table to
see if login is valid)
You'll need something like this in the configuration file. They will be
redirected to the login.aspx page if they're not authenticated.
<forms loginUrl="login.aspx" name=".APPLOGIN" protection="All" />
There are other methods, but I think those are 2 good ones. In either way,
you can specify many options in the configuration file, including rights
that apply to each page or folder. You can tell what users have access to
what files, and what actions they can do on it.
In MSDN, read those pages from the index:
Hope this helps.
"Shawn" <firstname.lastname@example.org> wrote in message
> Hey all,
> I am relatively new to the .NET environment. I am
> creating an ASP web app that connects to SQL2K. I am
> having a little trouble with the connection string. I
> can connect to my db no problem. My issue is that people
> can log onto my website and add themselves as a user.
> How do I change the connection string to use their login
> and password? Is there something I am missing? I am
> using the sp_addlogin to add them as a user in the
> database but I could have several hundred people logged
> in at one time. I am really confused, help