Click or drag to resize

WebDavSession Class

IT Hit WebDAV Classes Reference
Session for accessing WebDAV servers.
Inheritance Hierarchy
SystemObject
  ITHit.WebDAV.ClientWebDavSession

Namespace:  ITHit.WebDAV.Client
Assembly:  ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 2.0.420.0
Syntax
public class WebDavSession : IConnectionSettings

The WebDavSession type exposes the following members.

Properties
  NameDescription
Public propertyCode exampleAllowWriteStreamBuffering
Gets or sets a value that indicates whether to buffer the data sent to server.
Public propertyClientCertificates
Gets collection of certificates which will be attached to every request.
Public propertyContentEncoding
Gets or sets the HTTP character set of the output stream.
Public propertyCookieContainer
Cookies which will be added to all requests.
Public propertyCode exampleCredentials
Sets and gets credentials for connection.
Public propertyCustomHeaders
Custom user headers which will be added to all requests.
Public propertyExpect100Continue
Determines if header "Expect: 100-continue" will be sent with all request. Default value is true
Public propertyIIS6SSLSupport
Fixes urls for IIS 6 build-in WebDAV SSL connections.
Public propertyPreAuthenticate
Gets or sets a value that indicates whether to send an authenticate header with the request.
Public propertyCode exampleProxy
Sets and gets proxy's settings for connection.
Public propertySendChunked
Gets or sets a value that indicates whether to send data in segments.
Public propertyCode exampleTimeOut
Sets and gets time-out in milliseconds.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAuthenticationScheme(String)
Gets server authentication scheme.
Public methodGetAuthenticationScheme(Uri)
Gets server authentication scheme.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodCode exampleOpenFile(String)
Returns IFile corresponding to path.
Public methodCode exampleOpenFile(Uri)
Returns IFile corresponding to path.
Public methodCode exampleOpenFolder(String)
Returns IFolder corresponding to path.
Public methodCode exampleOpenFolder(Uri)
Returns IFolder corresponding to path.
Public methodCode exampleOpenItem(String)
Returns IHierarchyItem corresponding to path.
Public methodCode exampleOpenItem(Uri)
Returns IHierarchyItem corresponding to path.
Public methodCode exampleOpenVersion(String)
Returns IVersion corresponding to path.
Public methodCode exampleOpenVersion(Uri)
Returns IVersion corresponding to path.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Examples
string license = "<?xml version='1.0' encoding='utf...
WebDavSession session = new WebDavSession(license);
session.Credentials = new NetworkCredential("User1", "pwd");

IFolder folder = null;
try
{
    folder = session.OpenFolder(new Uri("http://server:8080/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