Click here to Skip to main content
16,007,472 members
Home / Discussions / C#
   

C#

 
GeneralRe: Checking Remote File Size? Pin
Nick Parker16-Jul-04 9:32
protectorNick Parker16-Jul-04 9:32 
AnswerRe: Checking Remote File Size? Pin
Andy Brummer16-Jul-04 10:01
sitebuilderAndy Brummer16-Jul-04 10:01 
AnswerRe: Checking Remote File Size? Pin
Javier Lozano16-Jul-04 19:42
Javier Lozano16-Jul-04 19:42 
GeneralInsertion Point's location in a RichTextBox Pin
bneacetp16-Jul-04 7:07
bneacetp16-Jul-04 7:07 
GeneralRe: Insertion Point's location in a RichTextBox Pin
LongRange.Shooter16-Jul-04 9:41
LongRange.Shooter16-Jul-04 9:41 
GeneralRe: Insertion Point's location in a RichTextBox Pin
bneacetp16-Jul-04 9:49
bneacetp16-Jul-04 9:49 
GeneralDirectoryServices - NT authentication Pin
Ruchi Gupta16-Jul-04 6:51
Ruchi Gupta16-Jul-04 6:51 
GeneralRe: DirectoryServices - NT authentication Pin
Member 76135316-Jul-04 7:05
Member 76135316-Jul-04 7:05 
Hi Ruchi

The administrator (hopefully you) of the AD can change the setting that "locks out accounts on X failed login attempts". This would solve your problem.

Also, you could try the Win32 Logon user function, although I would presume that it will cause the exact same error, as your error is not an error but an AD feature. The following code will log in a user account. The token returned can be used to make ur code impersonate the specific user account, calling System.Security.Principal.WindowsIdentity.Impersonate((System.IntPtr)token), if you should ever need that. If the account is invalid, you should recieve a 0 in the token returned from the function, as well as an error in the error variable.



[DllImport("advapi32.dll", SetLastError=true) ]
public static extern bool LogonUser(string lpszUsername, string
lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider,
outint phToken);

[DllImport("C:\\Windows\\System32\\Kernel32.dll")]
public static extern int GetLastError();

public static int LogonWindowsUser(string username, string domain, string password)
{
int token;
bool isLoggedin = LogonUser(username, domain, password, 3, 0, out token);
int error = GetLastError();
return token;
}

/Zalkina
GeneralExcel App In Win Form Pin
Mehbub16-Jul-04 6:36
Mehbub16-Jul-04 6:36 
GeneralRe: Excel App In Win Form Pin
LongRange.Shooter16-Jul-04 9:19
LongRange.Shooter16-Jul-04 9:19 
GeneralExcel App in Win Form Pin
Mehbub16-Jul-04 6:29
Mehbub16-Jul-04 6:29 
GeneralUser rights in .NET Pin
Member 76135316-Jul-04 5:57
Member 76135316-Jul-04 5:57 
GeneralRe: User rights in .NET Pin
Nick Parker16-Jul-04 6:25
protectorNick Parker16-Jul-04 6:25 
GeneralRe: User rights in .NET Pin
Member 76135316-Jul-04 6:51
Member 76135316-Jul-04 6:51 
GeneralRe: User rights in .NET Pin
Nick Parker16-Jul-04 8:19
protectorNick Parker16-Jul-04 8:19 
GeneralRe: User rights in .NET Pin
LongRange.Shooter16-Jul-04 9:24
LongRange.Shooter16-Jul-04 9:24 
QuestionHow To Change the cursor direction? Pin
kings_116-Jul-04 5:39
kings_116-Jul-04 5:39 
AnswerRe: How To Change the cursor direction? Pin
Nick Parker16-Jul-04 6:06
protectorNick Parker16-Jul-04 6:06 
GeneralRe: How To Change the cursor direction? Pin
kings_116-Jul-04 10:23
kings_116-Jul-04 10:23 
GeneralRe: How To Change the cursor direction? Pin
Nick Parker16-Jul-04 12:04
protectorNick Parker16-Jul-04 12:04 
AnswerRe: How To Change the cursor direction? Pin
LongRange.Shooter16-Jul-04 9:30
LongRange.Shooter16-Jul-04 9:30 
Generalreading access database Pin
funaki16-Jul-04 3:14
funaki16-Jul-04 3:14 
GeneralRe: reading access database Pin
Nick Parker16-Jul-04 3:46
protectorNick Parker16-Jul-04 3:46 
GeneralRe: reading access database Pin
Anonymous16-Jul-04 7:37
Anonymous16-Jul-04 7:37 
GeneralCompact Framework Timer Pin
j1e1g116-Jul-04 2:31
j1e1g116-Jul-04 2:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.