ConnectionDetails details = ConnectionDetails.CreateConnectionFromConfig();
            IClientTransport client = TransportFactory.CreateClientChannel(details.Transport);
            
            client.Connect(details);
            
            
            RequestMessage request = OperationFactory.Create(KeyCryptographicAlgorithmType.DES3, new CryptographicUsageMask() { DeriveKey = true }, ObjectType.SymmetricKey);
            client.SendRequest(request);
            ResponseMessage responseCreate = client.WaitForResponse();

            Guid keyId = responseCreate.GetFirstReturnedId();
            

            RequestMessage requestGet = OperationFactory.Get(keyId);
            client.SendRequest(requestGet);
            ResponseMessage responseGet = client.WaitForResponse();

            BaseObject obj=null;
            if (responseGet.IsIncludeManagedObject()) 
            {
                 obj = responseGet.GetIncludedManagedObject();
            }


           KeyBlock block= obj.Key;
          

Last edited Feb 8, 2014 at 8:42 AM by trotsia, version 1