Click or drag to resize

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; }

Property Value

Type: ICredentials
Examples
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