Microsoft.Win32.IntranetZoneCredentialPolicy.ShouldSendCredential Method

Returns a bool that indicates whether the client's credentials are sent with a request for a resource that was made using System.Net.WebRequest.

Syntax

public virtual bool ShouldSendCredential (Uri challengeUri, System.Net.WebRequest request, System.Net.NetworkCredential credential, System.Net.IAuthenticationModule authModule)

Parameters

challengeUri
The Uri that will receive the request.
request
The System.Net.WebRequest that represents the resource being requested.
credential
The System.Net.NetworkCredential that will be sent with the request if this method returns true.
authModule
The System.Net.IAuthenticationModule that will conduct the authentication, if authentication is required.

Returns

true if the requested resource is in the same domain as the client making the request; otherwise, false.

Remarks

Applications do not call this method directly; it is called by the System.Net.IAuthenticationModule that is responsible for performing authentication with the server. If this method returns false, the System.Net.IAuthenticationModule will not authenticate the client to the server.

This method is called only for requests that specify credentials or use a System.Net.WebProxy object that specifies credentials.

Requirements

Namespace: Microsoft.Win32
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0