Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a rather unexpected situation here. I have a small application that connects to a WebDAV server (Sharepoint) using the standard WebDAV windows client (WebClient service, part of the "desktop experience" feature), walk through a number of folder and download all PDF files it finds.

The overall process works. However, I'm experiencing a strange issue: when I run the application directly from the server's console or RDP desktop, it runs in about 10 seconds (assuming there is no file to download). When I run the same task from the same user but from a scheduled task, then it takes 5 minutes to complete and yield exactly the same result (files are downloaded if present).

I've added debug to the application to see where the latency happens and the result of this is that the operation of listing the file directory seems to take forever, even if the file filter used causes no file to be returned. The same behavior can be observed when using ProcMon: the latency is within the Win32 calls and ourtside of the application alltogether.

Now, this isn't really critical since the process works, but the more directories the are added the slower it gets and there will be a point where I will have to decrease the frequency at which the script is run so it can actually complete (or change the application so it start to process the directory in parallel).

Would anyone have some kind of explanation why the WebDAV client seems to be several orders of magnitude slower when running from a scheduled task ?

In case it matters, the connection is made with an explicit password each time and it goes over SSL.

share|improve this question
    
You're lucky that it least runs quickly for you when you run it manually. WebDAV runs like a dog with three broken legs for me no matter what. –  Ryan Ries Mar 15 '13 at 17:04
    
It's not like I have any choice: the remote endpoint is a sharepoint server managed by an external company for a customer of ours. WebDAV is still lightyears better than trying to use the Sharepoint APIs directly. –  Stephane Mar 15 '13 at 17:05
    
Try Internet Options -> Connections -> LAN Settings -> Uncheck Automatically detect settings? This checkbox will slow you down with regard to WebDAV because it waits on WPAD timeout. And maybe that setting is checked on your scheduled task because your profile doesn't get loaded the same way as it is when you manually log on? –  Ryan Ries Mar 15 '13 at 17:18
    
@RyanRies I verified the settings and the box is unchecked (the computer has to go through a proxy- which is configured - anyway). Good idea, though –  Stephane Mar 19 '13 at 10:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.