newbie

  • Thread starter Thread starter Siva
  • Start date Start date
S

Siva

Hi All,

Could anyone please let me know how to do a Windows
Authentication. I am not planning to do it using SQL
2000. The requirement goes like this.
When the user types in a Username and Password, I need
to collect them from my next form and need to validate
with the available Windows users. I am using only Windows
forms in C#. Any sample code is highly appreciated.

Thank you in advance

Siva
 
Siva,

In this case, you will want to make a call to the LogonUser API to
validate whether or not the credentials given are the correct ones. You
will have to call this through the P/Invoke layer.

Hope this helps.
 
Thank you for your reply. But I do not know how to do
this? Could you please
send me the sample code or link as to how to use this?

I appreciate your help
-----Original Message-----
Siva,

In this case, you will want to make a call to the LogonUser API to
validate whether or not the credentials given are the correct ones. You
will have to call this through the P/Invoke layer.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi All,

Could anyone please let me know how to do a Windows
Authentication. I am not planning to do it using SQL
2000. The requirement goes like this.
When the user types in a Username and Password, I need
to collect them from my next form and need to validate
with the available Windows users. I am using only Windows
forms in C#. Any sample code is highly appreciated.

Thank you in advance

Siva


.
 
Siva,

If you look at the documentation for the Impersonate method on the
WindowsIdentity class, it will show you how to declare the LogonUser API
function and call it.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Thank you for your reply. But I do not know how to do
this? Could you please
send me the sample code or link as to how to use this?

I appreciate your help
-----Original Message-----
Siva,

In this case, you will want to make a call to the LogonUser API to
validate whether or not the credentials given are the correct ones. You
will have to call this through the P/Invoke layer.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi All,

Could anyone please let me know how to do a Windows
Authentication. I am not planning to do it using SQL
2000. The requirement goes like this.
When the user types in a Username and Password, I need
to collect them from my next form and need to validate
with the available Windows users. I am using only Windows
forms in C#. Any sample code is highly appreciated.

Thank you in advance

Siva


.
 
Back
Top