NTLM authentication problem

Discussion in 'Java' started by Jitesh Gangwani, Dec 15, 2004.

  1. Hi,
    I am trying to a get a webpage which is on IIS server in different
    domain secured by NTLM authentication. I am using
    commons-httpclient-3.0-beta1 api to connect. I am not able to get
    index.html page.

    The NLTM api is giving following information messages
    15-Dec-2004 16:01:46
    org.apache.commons.httpclient.auth.AuthChallengeProcessor
    selectAuthScheme
    INFO: ntlm authentication scheme selected
    15-Dec-2004 16:01:46 org.apache.commons.httpclient.HttpMethodDirector
    processWWWAuthChallenge
    INFO: No credentials available for NTLM <any
    realm>@www.maintenance.cws.pse1.rbsgrp.net:80



    Following is the java code
    NTCredentials creds = new
    NTCredentials("USERNAME","PASSWORD","SERVER_IP_ADDRESS","CWSPSEHOLI");
    HttpClient client = new HttpClient();
    HttpMethod method = new GetMethod("http://servername/index.html");
    AuthScope authscope = new
    AuthScope("http://servername/index.html",80);
    client.getState().setCredentials(authscope,creds);
    int statusCode = client.executeMethod(method);
    System.out.println("Status Code 1: " + statusCode);
    String responseBody = method.getResponseBodyAsString();
    System.out.println("******" + responseBody);
    method.releaseConnection();

    Can anyone please tell me what I am doing wrong.

    Thanks

    Jitesh
    Jitesh Gangwani, Dec 15, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carlos Fersura

    WebControls and NTLM Authentication

    Carlos Fersura, Nov 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    341
    Carlos Fersura
    Nov 3, 2003
  2. Rob Mayo
    Replies:
    2
    Views:
    3,850
    Hernan de Lahitte
    Jan 26, 2004
  3. Will
    Replies:
    5
    Views:
    2,613
  4. Matthijs
    Replies:
    0
    Views:
    840
    Matthijs
    Dec 10, 2008
  5. Dave

    Random NTLM/Keberos Authentication Problem

    Dave, Jul 31, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    124
Loading...

Share This Page