Getting Started with IT Hit WebDAV Client for .Net
Adding Reference to Your Project
Download ITHit.WebDAV.Client.dll here and add a 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;
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.
The API has a built-in logging functionality provided by FileLogger class. The API logs requests, responses and headers depending on 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.
Important! When using the library in an ASP.NET Web Application or MVC project never create logs in your \bin folder. As soon as the log file is updated your web application will restart. You must explicitly specify the path to the log file when using the library in a web projects on a server side.
FileLogger.LogFile = "C:\\MyWebDAVLog.txt"; FileLogger.Level = ITHit.WebDAV.Client.Logger.LogLevel.All;