FileLogger.LogFile Property

IT Hit WebDAV for .NET

Gets and sets log file name and path.

[Visual Basic]
Public Shared Property LogFile As String
[C#]
public static string LogFile {get; set;}

Property Value

Log file name and path.

Remarks

By default the log file is created in the folder where the calling assembly resides. The folder in which you plan store your log files must exist and your web application must have enough permission for writing and creating files in this folder. Note that if you are creating HttpHandler-based server usually on Windows XP your web application runs under ASPNET account while on Windows 2003 it runs under Network Service account.

If you are requesting your server with a WebDAV client and log file is not created, most likely there is no permissions for creating file or the web requests simply does not reach your application.

public class WebDAVHandler : IHttpHandler
{
    public void ProcessRequest(HttpContext context)
    {
        FileLogger.LogFile = context.Request.PhysicalApplicationPath + "WebDAVlog.txt";
        ...
    }
    ...
}

See Also

FileLogger Class | ITHit.WebDAV.Logger Namespace