License.SetLicense

License.SetLicense method

SetLicense(Stream)

Applies the licence read from stream; throws when it is not accepted.

public void SetLicense(Stream stream)
ParameterTypeDescription
streamStreamA readable stream holding a licence file in the Aspose licence file format.

Exceptions

exceptioncondition
InvalidOperationExceptionThe licence is not accepted (bad signature, wrong product, expired).

See Also


SetLicense(string)

Applies the licence named licenseName; throws when it is not accepted. The first of these that holds it is used: the name as a path; the folder of the Aspose.CSS assembly; the folder of the calling assembly; the folder of the entry assembly; an embedded resource of the calling assembly whose name equals licenseName or ends with “.” and licenseName.

public void SetLicense(string licenseName)
ParameterTypeDescription
licenseNamestringA full or short file name or the name of an embedded resource; an empty string returns this process to evaluation mode.

Exceptions

exceptioncondition
ArgumentNullExceptionlicenseName is null.
FileNotFoundExceptionNo place holds the licence; the message names the places tried.
InvalidOperationExceptionThe licence is not accepted (bad signature, wrong product, expired).
IOExceptionThe file cannot be read.

See Also