Hey all,

UPDATE: I would still like someone to help with this if they can think of why it would be happening (so read further on for the original post contents), but I have had some success with a different HTTP request object. I tried using the straight XLMHTTP object, as in:


instead of what we have used previously for DocuWare (and for every other web service call we do from Foxpro):


The classes are close, but from my reading, ServerXMLHTTP should be everything that XMLHTTP is, plus is more robust for server use. XMLHTTP is meant for client operations, though, and that is what I am using it for. XMLHTTP also appears to call things asynchronously, because after the Send() my code after would error out until I did a loop waiting for ReadyState = 4 (like classic web page programming/scraping -- you need to wait for the response to finish).

Even after waiting for the response, using XMLHTTP made downloads fast again, from 30 seconds down to one second for a 20 MB file. This means I need to add wait loops to all of my Platform Service-based Send() calls, but that should not be too difficult. Will see if everything else works as it should after switching to the XMLHTTP object. I still have no idea why ServerXMLHTTP started getting slow on downloads when it has worked for every other web call we do in Foxpro, and has been working for 5+ years in that regard.


(Original post below...)

I am not sure if it is a new issue (but it seems like it is), but downloading files from DocuWare is very, very slow in certain situations. We are talking over 30 seconds to download a 20 MB PDF, and in one scenario it took over 5 minutes to download a file around 100 MB (166 pages).

This only happens when I download files via HTTP Request "GET" calls to the Platform Service, and it isn't just Foxpro. If I use the very common HTTP Request console Postman, it takes the exact same (long) amount of time to download documents. The resourse/URL I am talking about looks like:


(I don't mind if you know one of my on-premise cabinet GUIDs.  *smile*)

The funny part is that if I download the same document via the .NET package in C#, the files download instantly. Larger files might take a second longer, but it is definitely not struggling the way non-NET requests are. Additionally, if I paste the above URL into an authenticated browser session, the downloads are immediate as well. I tested that in Chrome, Firefox, IE, and Edge, and the file downloaded instantly. Doing an edit in DocuWare, which obviously pulls the file down, is also fast.

If it were just Foxpro, I'd say it's just my problem. But it isn't just Foxpro, it is Postman, too. This HTTP GET request is dead simple, yet it takes MUCH longer when using Foxpro and Postman and scales horribly as documents get larger. Everywhere else it is fast.

Is there something on IIS I should be looking at? Or a log that might explain what is taking so long for one style of download but not the others? I am glad that some methods are faster (because I just switched to our external call to a DotNet wrapper exe I wrote just for this contingency), but also confused since I assume those faster methods use the same HTTP stack and same Platform SDK request. Could this be an issue with one of the DocuWare services struggling in some way? I am not sure which clients and which calls use which service.

I would simply bounce IIS (and even the DocuWare server) to see if that helps, but I can't while things are live during the workday. If I could discover the problem via a less brute-force method, it would be greatly appreciated! I am off next week, so I really only have today to work on this until August 20. I'd love to have this off my mind before going on vacation!

Joe Kaufman