473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Shorter timeout for LogonUser?

I'm writing an application that will often be used in situations when the
application can not see the network. I'm authenticating the user when the
application starts up using LogonUser. This functions properly, using
cached credentials when the app can't find a domain controller, but it takes
way too long for it to timeout. Is there a way to instruct LogonUser to
give up and use the cached credentials sooner (or immediately if I know the
network is not available) ?

Thanks,

John
Jul 21 '05 #1
5 3086
Hi John,

We are currently researching on this issue, we will reply to you ASAP.
Thanks for your understanding.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2
> We are currently researching on this issue, we will reply to you ASAP.
Thanks for your understanding.


I've also noticed that the WindowsPrincipal.IsInRole method also has a very
long timout if the machine is disconnected.

Thanks,

John
Jul 21 '05 #3
> I've also noticed that the WindowsPrincipal.IsInRole method also has a
very
long timout if the machine is disconnected.


(BTW, this is a client application running on Windows XP SP2, and I need to
get it to work with windows domains (NT-2003) )
Upon further review, I have found that if I disable the network connection
(or keep it enabled, but unplug the ethernet cable) on the client computer,
both LogonUser and IsInRole return immediately with expected results.
However, if I keep the client machine on the network, but unplug the only
domain controller, both the LogonUser and IsInRole methods take over 30
seconds to execute, each finally resorting to cached information. I hope
these clues may shed some light. - John
Jul 21 '05 #4
Hi John,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to set the timeout value for
LogonUser method. If there is any misunderstanding, please feel free to let
me know.

As far as I know, this timeout value cannot be changed. This value is not a
definite value and it depends on the network connections. The LogonUser
method will be very slow when looking for the domain controller on the
network. If there is no network connection available, it will be much
faster.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #5
Hi John,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to set the timeout value for
LogonUser method. If there is any misunderstanding, please feel free to let
me know.

As far as I know, this timeout value cannot be changed. This value is not a
definite value and it depends on the network connections. The LogonUser
method will be very slow when looking for the domain controller on the
network. If there is no network connection available, it will be much
faster.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nimi | last post by:
When I run my application , the LogonUser method fails the exception is "LogonUser failed with error code :1314". I know the error is because of some privileges . I am using Windows 2000 sp4. I...
1
by: Rich | last post by:
I am running IIS6 on a Win2k3 server. I have an ASP.Net app (C#) that a user logs into and then I use LogonUser to validate them and log them onto the server. I have Windows Authentication ONLY...
3
by: Zeno Lee | last post by:
I'm trying to authenticate a user against a windows network. I want it to work across any kind of windows network from NT 4.0 up to Windows 2003 ADS. So far I've been using DirectoryEntry and...
3
by: Dan | last post by:
All, I am attempting to use the LogonUser API in an application. However, everytime I attempt to validate an account using this I get an error. The code is 1421 which has a description of...
2
by: BLiTZWiNG | last post by:
Having a few strage behaviours with this function, mainly in that when I try to logon to another computer with a different name/pass to the current user of the local machine, it tries to...
4
by: John | last post by:
I'm writing an application that will often be used in situations when the application can not see the network. I'm authenticating the user when the application starts up using LogonUser. This...
6
by: AlGorr | last post by:
Hello,,, I don't know much about PHP+SQL but I have to find the better way to make my query work and to be shorter and better. All help will be appreciated. //Check if IP exists in banIP...
0
by: serban.lascu | last post by:
Hello! I have an application using LogonUser for authentification, running under XP SP2. LogonUser answers after a very long time (30 to 90 seconds) in the cases above: - I log on to Windows...
9
by: schaf | last post by:
Hi NG ! I used the examples on the internet to create a Impersonate class which allows me to log on as another user. After logged on as the new user I could access files on a remote computer,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.