Women in Technology

Hear us Roar



Article:
  Sliding into WebDAV
Subject:   WebDav & NTLM
Date:   2005-07-10 07:52:10
From:   Yensen
Need Help!!!
1. Are there codes to handle NTLM connection?
I am sending the request to IIS (Windows 2003 Server), when I run the codes,
HttpURL hrl = new HttpURL(mySite);
hrl.setUserinf(myUserName,myPassword);
The response is
WARNING: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials.


2) How do you set up the webdav accounts for for extranet users??


Thanks in advance


Yensen

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • WebDav & NTLM
    2005-08-01 07:01:16  bwandrack [View]

    Yensen,

    Can't help with #2, but I am currently using NTLM and WebDav. Here is some sample code that should help:



    NTCredentials creds = new NTCredentials(userName, password, hostAdd, "" );
    HostConfiguration hostConfig = new HostConfiguration();
    hostConfig.setHost(hostAdd); //Not url, just ip address or fully qualified DN
    HttpURL host = new HttpURL("http://" + hostUrl);
    WebdavResource res = new WebdavResource(host, (Credentials)creds, WebdavResource.DEFAULT, DepthSupport.DEPTH_1);


    Hope this helps.


    Bill Wandrack