WebDavSessionAsyncCredentials Property
IT Hit WebDAV Classes Reference
Sets and gets credentials for connection.
Namespace:
ITHit.WebDAV.Client
Assembly:
ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 2.0.420.0
Syntax public ICredentials Credentials { get; set; }
Public Property Credentials As ICredentials
Get
Set
public:
virtual property ICredentials^ Credentials {
ICredentials^ get () sealed;
void set (ICredentials^ value) sealed;
}
abstract Credentials : ICredentials with get, set
override Credentials : ICredentials with get, set
Property Value
Type:
ICredentialsExamples string license = "<?xml version='1.0' encoding='utf...
WebDavSessionAsync session = new WebDavSessionAsync(license);
session.Credentials = new NetworkCredential("User1", "pwd");
IFolderAsync folder = null;
try
{
folder = await session.OpenFolderAsync(new Uri("https://server/Products"));
}
catch(UnauthorizedException)
{
Console.WriteLine("Incorrect user name or password.");
}
catch(NotFoundException)
{
Console.WriteLine("Folder not found.");
}
if(folder!=null)
{
Console.WriteLine(folder.LastModified.ToString());
}
See Also