N
Nick
Platform: Visual Studio 2003
Language: C#
NOTES:
1. Application will need to run on Windows 2000, Windows 2003, Windows
XP
2. Client machines will be standalone NOT part of a domain.
3. I don't want to depend on having Active Directory installed
Problem Description:
When my application starts, it checks if the current windows user
belongs to a group. If he/she does belong to the group it allows them
to run it. If he/she does NOT belong to the group, it prompts them to
log in as another user that will belong to that group. I having trouble
authenticating the windows login and password. I reasearched this issue
for quite some time but no luck. These are some of my attempts to solve
the problem:
1. Using the LogonUser () function. This call will not work under
Windows 2000 unless you
make a change to the security policy. Not good for me!
2. Using the DirectoryEntry in DirectoryServices namespace. I created
an instance of the
DirectoryEntry class and passed the path, name, login, password and
authenticationtype.
Tried to bind to the Native object with "Object native =
deDirEntry.NativeObject;" but it did
not work. I used the following value for path: "WinNT://" +
Environment.MachineName
NOTE: If I could do this with managed code that would be great.
Thanks in Advance
Language: C#
NOTES:
1. Application will need to run on Windows 2000, Windows 2003, Windows
XP
2. Client machines will be standalone NOT part of a domain.
3. I don't want to depend on having Active Directory installed
Problem Description:
When my application starts, it checks if the current windows user
belongs to a group. If he/she does belong to the group it allows them
to run it. If he/she does NOT belong to the group, it prompts them to
log in as another user that will belong to that group. I having trouble
authenticating the windows login and password. I reasearched this issue
for quite some time but no luck. These are some of my attempts to solve
the problem:
1. Using the LogonUser () function. This call will not work under
Windows 2000 unless you
make a change to the security policy. Not good for me!
2. Using the DirectoryEntry in DirectoryServices namespace. I created
an instance of the
DirectoryEntry class and passed the path, name, login, password and
authenticationtype.
Tried to bind to the Native object with "Object native =
deDirEntry.NativeObject;" but it did
not work. I used the following value for path: "WinNT://" +
Environment.MachineName
NOTE: If I could do this with managed code that would be great.
Thanks in Advance