C# .NET - How to add credentials to webservice???
Asked By balaram krishna on 29-Jun-10 07:08 AM
Hiiii,
I want a procedure to add credentials to webservice from client side????
Thanks,
Balaram.
Venkat K replied to balaram krishna on 29-Jun-10 07:20 AM
You can use UseDefaultCredentials property on an instance of a client proxy class is set to true the client will use the default credentials to authenticate to the Web service.
For example:
UseDefaultCredentialsService service = new UseDefaultCredentialsService();
service.UseDefaultCredentials = true;
or you can set the default credentials to the service as follows:
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
Thanks
balaram krishna replied to Venkat K on 29-Jun-10 07:38 AM
I Have Username,Password for my service but i dont know the procedure to add them i am very new to the webservices.
Thanks,
Balaram.