Shorter timeout for LogonUser?

J

John

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
 
J

Jeffrey Tan[MSFT]

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.
 
J

John

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
 
J

John

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
 
K

Kevin Yu [MSFT]

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."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top