FileWebRequest.Credentials 属性
定义
获取或设置与此请求关联的凭据。Gets or sets the credentials that are associated with this request. 保留此属性供将来使用。This property is reserved for future use.
public:
virtual property System::Net::ICredentials ^ Credentials { System::Net::ICredentials ^ get(); void set(System::Net::ICredentials ^ value); };
public override System.Net.ICredentials? Credentials { get; set; }
public override System.Net.ICredentials Credentials { get; set; }
member this.Credentials : System.Net.ICredentials with get, set
Public Overrides Property Credentials As ICredentials
属性值
包含与此请求关联的身份验证凭据的 ICredentials。An ICredentials that contains the authentication credentials that are associated with this request. 默认值为 null。The default is null.
注解
由于 FileWebRequest 类不会对本地文件系统中的文件请求进行身份验证,因此将忽略属性的内容(如果有) Credentials 。Because the FileWebRequest class does not authenticate requests for files from the local file system, it ignores the contents, if any, of the Credentials property. 的身份验证 FileWebRequest 由基础文件系统中文件资源的访问控制列表进行处理。Authentication for FileWebRequest is handled by the access control lists for the file resource in the underlying file system.