Click or drag to resize

WebDavSessionCredentials 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: 6.0.4052-Beta
Syntax
public ICredentials Credentials { get; set; }

Property Value

Type: ICredentials
Examples
string license = "<?xml version='1.0' encoding='utf...
WebDavSession session = new WebDavSession(license, new HttpClientHandler() { Credentials = new NetworkCredential("User1", "pwd") });

IFolder folder = null;
try
{
    folder = await session.GetFolderAsync(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