Women in Technology

Hear us Roar



Article:
  Sliding into WebDAV
Subject:   WebDav & NTLM
Date:   2005-09-19 03:34:29
From:   dennis_surendar
Response to: WebDav & NTLM

Bill,


Tried with the code given above:


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);



However, I see an authentication-warning message saying "Already tried to authenticate with null authentication realm at <exchange server name>, but still receiving: HTTP/1.1 401 Access Denied". Proceeding furhter with the method "WebdavResource.list ();" gives a NullPointerException.


Am I doing something wrong? Do I need to setup my Tomcat to redirect the authentication to MS Exchange server? Please help.


Thanks in advance.



- Dennis.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • WebDav & NTLM
    2005-09-20 04:27:52  dennis_surendar [View]

    Bill,

    Finally I solved the puzzle.

    Before trying with the above code snippet, I tried to access my Exchange server through Outlook Web Access (OWA) from my browser. While doing so, the browser saved the prompted user-id (Administrator) and password in the password manager.

    Hence, for the next time, when I tried to connect to the Exchange server using your code snippet, I got the following error message -

    "Already tried to authenticate with null authentication realm at ${Exchange server name}, but still receiving: HTTP/1.1 401 Access Denied".

    To overcome this, I just cleared the saved passwords in the browser settings. After doing so, the program works like a charm...!

    Thank you.

    Regards,
    Dennis.