You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Michael Cheong <aj...@yahoo.com> on 2006/09/21 03:12:55 UTC

Java Http Client with NTLM authentication

Hi All,
I have a Java app on one machine and I'm trying to
send a HTTP POST to an asp page residing on another
machine that has IIS. What I get is HTTP 401 error
(access denied), and I found that it was due to NTLM
authentication by IIS. How do I get around this using
commons? Would greatly appreciate some sample code, thanks!

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Java Http Client with NTLM authentication

Posted by Paul DeCoursey <pa...@decoursey.net>.
http://jakarta.apache.org/commons/httpclient/authentication.html#NTLM
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/ 
commons/httpclient/NTCredentials.html


Take a look at these links, I don't think the code I've used would be  
of much help to be honest. If you are still stuck after looking over  
those let me(the list) know.  I don't have access any IIS servers  
anymore so I can't really write any code and test it.

Paul

On Sep 20, 2006, at 10:03 PM, Michael Cheong wrote:

> Hi Paul,
> Do you have any sample source of your implementation?
> I've looked at jcifs before but didn't get very far :(
>
> --- Paul DeCoursey <pa...@decoursey.net> wrote:
>
>> I've never actually done exactly what you describe,
>> but I have used
>> jcifs to authenticate against a NTLM domain
>> controller before. This
>> might be a place to start.
>>
>> http://jcifs.samba.org/
>>
>> Paul
>>
>> On Sep 20, 2006, at 8:12 PM, Michael Cheong wrote:
>>
>>> Hi All,
>>> I have a Java app on one machine and I'm trying to
>>> send a HTTP POST to an asp page residing on
>> another
>>> machine that has IIS. What I get is HTTP 401 error
>>> (access denied), and I found that it was due to
>> NTLM
>>> authentication by IIS. How do I get around this
>> using
>>> commons? Would greatly appreciate some sample
>> code, thanks!
>>>
>>> __________________________________________________
>>> Do You Yahoo!?
>>> Tired of spam?  Yahoo! Mail has the best spam
>> protection around
>>> http://mail.yahoo.com
>>>
>>>
>>
> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>> commons-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>> commons-user-help@jakarta.apache.org
>>>
>>
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
>> commons-user-help@jakarta.apache.org
>>
>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Java Http Client with NTLM authentication

Posted by Michael Cheong <aj...@yahoo.com>.
Hi Paul,
Do you have any sample source of your implementation?
I've looked at jcifs before but didn't get very far :(

--- Paul DeCoursey <pa...@decoursey.net> wrote:

> I've never actually done exactly what you describe,
> but I have used 
> jcifs to authenticate against a NTLM domain
> controller before. This 
> might be a place to start.
> 
> http://jcifs.samba.org/
> 
> Paul
> 
> On Sep 20, 2006, at 8:12 PM, Michael Cheong wrote:
> 
> > Hi All,
> > I have a Java app on one machine and I'm trying to
> > send a HTTP POST to an asp page residing on
> another
> > machine that has IIS. What I get is HTTP 401 error
> > (access denied), and I found that it was due to
> NTLM
> > authentication by IIS. How do I get around this
> using
> > commons? Would greatly appreciate some sample
> code, thanks!
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Java Http Client with NTLM authentication

Posted by Paul DeCoursey <pa...@decoursey.net>.
I've never actually done exactly what you describe, but I have used 
jcifs to authenticate against a NTLM domain controller before. This 
might be a place to start.

http://jcifs.samba.org/

Paul

On Sep 20, 2006, at 8:12 PM, Michael Cheong wrote:

> Hi All,
> I have a Java app on one machine and I'm trying to
> send a HTTP POST to an asp page residing on another
> machine that has IIS. What I get is HTTP 401 error
> (access denied), and I found that it was due to NTLM
> authentication by IIS. How do I get around this using
> commons? Would greatly appreciate some sample code, thanks!
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org