(Advertisment)
German Wear Discount Shop - Click Here
[Dot]Net-Friends
Skip Navigation Links
Home
Latest
Fast Code
Articles
Tutorials
Online Resources
Forums
Login   | Hi, Guest


Started By: kunaltilakReplies: 0 Views: 1035

<<ASP.NET Web Services and XML Serialization
By:kunaltilak
help on http basic authentication(RFC2617)
kunaltilak Profile Avatar
May 04, 2010 06:34
Points 1
Hi sir,

I am calling a webservice in asp.net by http basic authentication(RFC2617) but unable to do so despite numerous attempts.

my code is(not working for me):

MyService service = new MyService();
service.Credentials = new NetworkCredential("username", "password");
service.PreAuthenticate = true;

and
MyService service = new MyService();
NetworkCredential netCredential = new NetworkCredential("username", "password");
Uri uri = new Uri(service.Url);
service.Credentials = netCredential.GetCredential(uri, "Basic");
service.PreAuthenticate = true;


My client has given me document as follows how to call webservice:

please read about RFC2617 and how to implement it.
It's clearly mentioned on page 110 of the Integration Document:
Technology Partner Authentication
"Technology Partner", in the context of this document, means an authorized
"Account" on the IRCTC site authorized to consume the web services. The username and password of the "Technology Partner" is set in the http header.

NOTE: IRCTC Webservices follows strictly, the HTTP BASIC Authentication
(RFC2617), so the same has to be followed by the integrating parties
whether on Java/.NET or any other platform.

plz sir help me.

Thanks & Regards
Kunal Tilak
Reply to this Thread Start New Thread