COM API: open file using http whose server uses authentication NLTM

By Xiaodong Liang

Issue

When using the API the functions for OpenFile and AppendFile (COM Automation, Document.OpenFile), we get an exception when loading files from a http server. This server uses authentication NLTM.  In UI and use the File Open and Append,  there is no problem.

Solution

In product, with interactive user
    ‘Open File’ and ‘Append’ both pop the Windows ‘File Open’ dialog. This effectively will use IE (and NLTM) to download the whole file in one go and then Roamer will try and open/append it from the local cache.

    ‘Open URL’ will try and open NWD files in a custom manner by downloading chunks of it from the server using  a "GET" "Range: bytes=%s-%s". Server must support such operation. No authentication is supported.    

The Automation and ActiveX control of COM API uses same code as ‘Open URL’.  So, Open/Append files by COM API from the server using NLTM is not supported.


Comments

One response to “COM API: open file using http whose server uses authentication NLTM”

  1. I checked the usual firewall and anti virus settings and still had no joy! After a bit of research and discovering that I wasn’t the only person to have this problem it turns out that it is a NTLM authentication problem, and this information helps me a lot. Thanks!
    http://www.ultrafileopener.com/formats/bluebutton/

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading