Re: Authenticating domain users
From: D0tN3t C0d3r (d0tn3tc0d3r_at_yahoo.com)
Date: 03/01/05
- Next message: Adrian: "Re: Get the name of the file..."
- Previous message: Newbie: "Re: Popup window width"
- In reply to: Yaron: "Authenticating domain users"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 01 Mar 2005 13:00:04 -0800
Hi Yaron,
What kind of application is this? Is it a Web Application or a Windows
Forms Application? The reason being, there are different methods for
network authentication based upon the model used. I will provide links
to both.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmod/html/secmod16.asp
(Using Forms Authentication)
http://www.codeproject.com/csharp/getusername.asp (Windows Forms)
http://www.dnzone.com/ShowDetail.asp?NewsId=504
For your second question, what you need to do is in your connection
string for the SqlConnection object, you need something along these
lines: "server=(local);database=Northwind;Trusted_Connection=yes". You
can also dynamically build the connection string using:
"server=(local);database=Northwind;UID=<user
name>;PWD=<pass>;Trusted_Connection=yes;"
HTH,
~d
Yaron wrote:
> Hi,
>
> I am writing a program that will require a user to log in using their domain
> account which will then take the information to a SQL Server database stored
> on the server and try to log in using that information.
>
> Several questions:
>
> 1) What class should I use once I have the username / password to
> authenticate the account on the domain?
> 2) Is there any way for me to use Windows' authentication dialog? This is
> the dialog that always comes up when you try to access something that you
> need to login to. IE uses it, as well as Windows Explorer. I'd much rather
> use this dialog somehow than create one of my own.
> 3) Slightly unrelated question... Lets say the user authenticated correctly
> against the domain, and now I want to access the database. I currently have
> it set so that I have database roles assigned to user types on the domain.
> So, when I login to the database using SqlConnection, should the username and
> password be set to the the user's domain username and password?
>
> Thanks for all help!
>
> Yaron
- Next message: Adrian: "Re: Get the name of the file..."
- Previous message: Newbie: "Re: Popup window width"
- In reply to: Yaron: "Authenticating domain users"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|