System
2.0.0.0
4.0.0.0
The credential policy determines whether to send credentials when sending a for a network resource, such as the content of a Web page. If credentials are sent, servers that require client authentication can attempt to authenticate the client when the request is received instead of sending a response that indicates that the client's credentials are required. While this saves a round trip to the server, this performance gain must be balanced against the security risk inherent in sending credentials across the network. When the destination server does not require client authentication, it is best not to send credentials.
policies are invoked only if the or the that is associated with the request has credentials that are not null. Setting this policy has no effect on requests that do not specify credentials.
Use the property to set an policy. The that handles authentication for the request will invoke the method before performing the authentication. If the method returns false, authentication is not performed.
An policy affects all instances of with non-null credentials in the current application domain. The policy cannot be overridden on individual requests.
Defines the credential policy to be used for resource requests that are made using and its derived classes.
Method
2.0.0.0
4.0.0.0
System.Boolean
After an policy has been specified by setting the property, the that handles authentication for a invokes the method before performing the authentication. If this method returns false, authentication is not performed.
When the original request has been redirected or proxy authentication is required, the resource identified by can be different from the requested resource that is specified in . In the case of redirection, contains the actual destination . If proxy authentication is required, contains the address of the proxy server that requires client authentication.
Returns a that indicates whether the client's credentials are sent with a resource request made using an instance of the class.
true if the credentials are sent with the request; otherwise, false.
The that will receive the request. For more information, see the Remarks section.
The that represents the resource being requested.
The that will be sent with the request if this method returns true.
The that will conduct the authentication, if authentication is required.