CSDNCurrent en:License Information

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche



The license information of the current Cryptshare Server installation and the Add-On Product's own license information can be queried from the server using the Client's RequestLicenseInfo() method. The method returns a LicenseInfo object containing the license status of the Cryptshare Server and the Add-On Product, as well as the respective license and subscription expiration dates in the format "YYYY-MM-DD".

Example: Requesting the License Information

// First create the Client instance
// Create a WebServiceUri for your Cryptshare Server 
WebServiceUri serviceUri = new WebServiceUri("https://cryptshare.server.com");
 
// Create a CryptshareConnection instance for your WebServiceUri
CryptshareConnection connection = new CryptshareConnection(serviceUri);
 
// Create the Client instance with the sender's email address, 
// the CryptshareConnection, and the path to the verification store.
Client client = new Client("sender_email@server.com", connection, @"C:\temp");

// Request the License Information
LicenseInfo licenseInfo = client.RequestLicenseInfo();

Console.WriteLine("Server license expiration date: " + 
						licenseInfo.ServerLicenseExpirationDate);
Console.WriteLine("Server subscription expiration date: " + 
						licenseInfo.ServerSubscriptionExpirationDate);
Console.WriteLine("Is server license valid? " + licenseInfo.ServerLicenseValid);
Console.WriteLine("Product license expiration date: " + 
						licenseInfo.ProductLicenseExpirationDate);
Console.WriteLine("Product subscription expiration date: " + 
						licenseInfo.ProductSubscriptionExpirationDate);
Console.WriteLine("Is product license valid? " + licenseInfo.ProductLicenseValid);