Page view counter

These tutorials demonstrate selected features in ASP.NET version 2.0, but they are compatible with later versions of ASP.NET as well. For the current documentation, see the ASP.NET portal on the MSDN Web site.

 

 

   Welcome   |   ASP.NET   |   Web Services   |   Class Browser   
  |   I want my samples in...      

ASP.NET 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:

		
Dim service As New UseDefaultCredentialsService()
service.UseDefaultCredentials = True
VB

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

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

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 � 2005 Microsoft Corporation. All rights reserved.