Getting Started with WebDAV Client for .NET
Adding Reference to Your Project
Download ITHit.WebDAV.Client.dll here and add reference to this dll to your .NET project. In Visual Studio select Add Reference context menu and select Browse tab in Add Reference dialog. Find the ITHit.WebDAV.Client.dll and click OK.

Then add following namespaces to your .cs file:
using ITHit.WebDAV.Client;
using ITHit.WebDAV.Client.Logger;
using ITHit.WebDAV.Client.Exceptions;
Setting License
The ITHit.WebDAV.Client.dll is fully functional and does not have any limitations. However to start using the API you will also need a license string. Download the trial license here. The license is time-limited and the dll will stop working after the trial period expires.
Pass the license text from a license file to WebDAVSession constructor:
string license = @"<?xml version='1.0' ...
WebDavSession session = new WebDavSession(license);
Make sure you do not change any text in Data and Signature tags of license string as license validation will fail.
Logging
The API has a built-in logging functionality provided by FileLogger class. The API logs requests, responses and headers depending in logger settings. If you experience any problems with the API the first thing you should do is to examine your log file.
By default the log file is created in the folder where the calling assembly resides (your .exe or .dll file). You can specify the folder and file name setting FileLogger.LogFile property. The folder in which you plan store your log files must exist and your application must have enough permission for writing and creating files in this folder.
FileLogger.Level property provides the method of limiting amount of logging output. During the development you will usually set Level to All. To turn off logging set the Level property to Off.
FileLogger.LogFile = "C:\\MyWebDAVLog.txt";
FileLogger.Level = ITHit.WebDAV.Client.Logger.LogLevel.All;
comments powered by
|