Home   |   QuickStart Welcome   |   ASP.NET   |   Web Services   |   How Do I...?   
  |   I want my samples in...      

ASP.NET 2.0 Web Services QuickStart Tutorial

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;

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

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

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

Run VB Sample
Run Sample View Source

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