Welcome   |  ASP.NET   |  Web Services   |  How Do I...?   |  Class Browser  | WPF Quick Starts
  |   I want my samples in...   

ASP.NET Web Services QuickStart Tutorial

Go To...

Simple Web Service That Demonstrates the UseDefaultCredentials Feature

When the 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;
C#

Setting the UseDefaultCredentials property to true is equivalent to the following lines of code:

		
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
C#

NOTE: The Web service in this sample must be configured to support integrated Windows authentication to properly demonstrate passing default credentials.

Run C# Sample
Run Sample View Source



Microsoft .NET Framework SDK QuickStart Tutorials Version 2.0
Copyright � 2005 Microsoft Corporation. All rights reserved.


Hosted by MaximumASP | Found a broken link? | Contact Us | Terms and conditions | Privacy Policy | Advertise with us
� 2000 - 2010  Mindcracker LLC. All Rights Reserved