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
Microsoft .NET Framework SDK QuickStart Tutorials Version 2.0
Copyright � 2005 Microsoft Corporation. All rights reserved.
|