EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Problem connecting to WebDAV server with Digest authentication

Posted: 05/07/2012 17:24:38
by Mikayel Aghasyan (Basic support level)
Joined: 05/07/2012
Posts: 2


I am trying to connect to WebDAV server with Digest authentication.

            TElHTTPSWebDAVClient HTTPSClient = new TElHTTPSWebDAVClient();
            HTTPSClient.UseDigestAuth = true;
            HTTPSClient.OnCertificateValidate += new SBSSLCommon.TSBCertificateValidateEvent(HTTPSClient_OnCertificateValidate);
            HTTPSClient.OnError += new SBSSLCommon.TSBErrorEvent(HTTPSClient_OnError);
            HTTPSClient.RequestParameters.Username = username;
            HTTPSClient.RequestParameters.Password = password;
            HTTPSClient.HTTPVersion = TSBHTTPVersion.hvHTTP11;

            TElWebDAVClient DAVClient = new TElWebDAVClient();
            DAVClient.HTTPSWebDAVClient = HTTPSClient;
            DAVClient.BaseURL = host;

            TElWebDavObjectList objList = new TElWebDavObjectList();

It is connecting and authenticating successfully but then throwing the following exception on the List call:

System.IndexOutOfRangeException was unhandled by user code
  Message=Index was outside the bounds of the array.
       at SBHTTPAuth.__Global.AuthConverse(AUTH_SEQ& pAS, String BuffIn, String& BuffOut, Boolean& NeedMoreData, String Package, String User, String Password)
       at SBHTTPAuth.__Global.AddAuthorizationHeader(String& Str, String Scheme, String AuthData, String UserName, String Password, Boolean& NeedMoreData, Boolean ForProxy, AUTH_SEQ& aSeq)
       at SBHTTPSClient.TElHTTPSClient.AuthModifyBefore(TElStringList Headers, String URI)
       at SBHTTPSClient.TElHTTPSClient.InitiateRequest(Int32 Method, String URL)
       at SBHTTPSClient.TElHTTPSClient.PerformRequest(Int32 Method, String URL)
       at SBHTTPSClient.TElHTTPSClient.CustomRequest(String URL, String Method, Stream Content, Boolean CloseStream)
       at SBHTTPSWebDAVClient.TElHTTPSWebDAVClient.PropFind(String URL, TElWebDavPropertyInfoList Properties, Boolean All, TSBWebDavDepth Depth)
       at SBWebDAVClient.TElWebDAVClient.List(String URL, TElWebDavObjectList Objects)
       at SBWebDAVClient.TElWebDAVClient.List(TElWebDavObjectList Objects)
       at UDriveUI.WebDAVClient..ctor(String host, String username, String password) in C:\Users\Mikayel\Documents\Visual Studio 2010\Projects\UDrive\UDriveUI\WebDAVClient.cs:line 34
       at UDriveUI.MainWindow.MountDrive(String driveLetter, String URL, String username, String password) in C:\Users\Mikayel\Documents\Visual Studio 2010\Projects\UDrive\UDriveUI\MainWindow.xaml.cs:line 52
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

I guess it has something to do with authentication but cannot understand what exactly.

Any thoughts?
Any help is highly appreciated.

Posted: 05/08/2012 01:28:26
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

Your code is correct. What server software do you use? Can we access this server to reproduce the exception?
Posted: 05/08/2012 04:39:16
by Eugene Mayevski (Team)

Thank you for providing access for testing. I've removed login credentials here and moved the post to the helpdesk for investigation.

Sincerely yours
Eugene Mayevski
Posted: 05/08/2012 04:42:11
by Mikayel Aghasyan (Basic support level)
Joined: 05/07/2012
Posts: 2




Topic viewed 1206 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!