System
2.0.0.0
4.0.0.0
System.Object
System.Net.ICredentialPolicy
This policy allows credentials to be sent only if the requested resource is in the same domain as the client that is making the request. For many applications this is the optimal policy because it prevents network credentials from being sent with requests for resources that are not on the intranet.
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 the policy. The that handles authentication for the request will invoke the method before performing the authentication. If the requested resource is in a different domain than the client, the method returns false, and authentication is not performed.
This policy affects all instances of with non-null credentials in the current application domain. The policy cannot be overridden on individual requests.
Defines a credential policy to be used for resource requests that are made using and its derived classes.
Constructor
2.0.0.0
4.0.0.0
Applications use this constructor to create objects that can be used to set the property.
Initializes a new instance of the class.
Method
2.0.0.0
4.0.0.0
System.Boolean
Applications do not call this method directly; it is called by the that is responsible for performing authentication with the server. If this method returns false, the will not authenticate the client to the server.
This method is called only for requests that specify credentials or use a object that specifies credentials.
Returns a that indicates whether the client's credentials are sent with a request for a resource that was made using .
true if the requested resource is in the same domain as the client making the request; otherwise, false.
The that will receive the request.
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.