Engine.License Property

IT Hit WebDAV for .NET

Gets the license text from the default location.

[Visual Basic]
Overridable Public ReadOnly Property License As String
[C#]
public virtual string License {get;}

Property Value

License string

Remarks

By default IT Hit WebDAV engine searches for License.lic in the executing and calling assembly directories (in the folder where your .dll or .exe file resides). To store your license in a different place (registry, database, etc) you should override License property and return the license text from this property. You can also hardcode the license text in your code. In this case you do not need any additional files when redistributing your application.

Make sure you do not make any changes in Data and Signature tags as license validation will fail in this case.

Example

public class MyEngine : Engine
{
    ...
    public override string License
    {
        get
        {
            TextReader reader = File.OpenText(
                HttpContext.Current.Request.PhysicalApplicationPath + "License.lic");
            string license = reader.ReadToEnd();
            reader.Close();
            return license;
        }
    }
    ...
}

See Also

Engine Class | ITHit.WebDAV.Server Namespace