CSDNCurrent en:General Server Data

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche

With the Client's method RequestServerData() you can request general server data from the Cryptshare Server. The method returns a ServerData object which contains the official base URL of the Cryptshare Server, the server's time zone, as well as the disk spaces in bytes that are available for future file transfers.

Example: Requesting General Server Data

// 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 general server data
ServerData serverData = client.RequestServerData();

Console.WriteLine("Official Cryptshare Server URL: " + serverData.ServerUrl);
Console.WriteLine("Server time zone: " + serverData.ServerTimeZone);
Console.WriteLine("Available disk space for uploaded transfers (retention folder) in bytes: " 
										+ serverData.AvailableRetentionDiskSpace);                
Console.WriteLine("Available disk space for transfers during upload (temporary folder) in bytes: " 
										+ serverData.AvailableTempDiskSpace);