I am programming what is to be a web service client that will use an
HTTP-POST to request and retrieve data. The remote server (written in java
for what it's worth) requires basic authentication as per RFC 2617
(http://www.faqs.org/rfcs/rfc2617.html). My attempts to authenticate are
failing. The server requires the header to be present with the request.
For security reasons, it will not reply in any way if the header is not
present.
i need a code in .net which consume Java web services that pass basic authentication as per RFC 2617 (http://www.faqs.org/rfcs/rfc2617.html).means basic authentication is required in header for every request. Please help me for the code .
Code is:
request = (HttpWebRequest ) WebRequest.Crea te(SomeURI);
request.PreAuth enticate = true;
request.Credent ials = new NetworkCredenti al("rts","rts") ;
request.Timeout = 30 * 1000;
request.Method = "POST";
request.Content Type = "applicatio n/x-www-form-urlencoded";
request.Content Length = reqBytes.Length ;
Stream reqStream = request
reqStream.Write (reqBytes,0,req Bytes.Length);
reqStream.Close ();
This code doesn't pass the header authentication
Thanks
HTTP-POST to request and retrieve data. The remote server (written in java
for what it's worth) requires basic authentication as per RFC 2617
(http://www.faqs.org/rfcs/rfc2617.html). My attempts to authenticate are
failing. The server requires the header to be present with the request.
For security reasons, it will not reply in any way if the header is not
present.
i need a code in .net which consume Java web services that pass basic authentication as per RFC 2617 (http://www.faqs.org/rfcs/rfc2617.html).means basic authentication is required in header for every request. Please help me for the code .
Code is:
request = (HttpWebRequest ) WebRequest.Crea te(SomeURI);
request.PreAuth enticate = true;
request.Credent ials = new NetworkCredenti al("rts","rts") ;
request.Timeout = 30 * 1000;
request.Method = "POST";
request.Content Type = "applicatio n/x-www-form-urlencoded";
request.Content Length = reqBytes.Length ;
Stream reqStream = request
reqStream.Write (reqBytes,0,req Bytes.Length);
reqStream.Close ();
This code doesn't pass the header authentication
Thanks
Comment