public byte[] GetResourceContents(ItemIdentifier itemId, Type itemType, Resource resource, string revision) { //encrypt login and password string loginName = ""; string pass = ""; getloginAndPass(UserId, ref loginName, ref pass); string _url = getWSUrl(this.Url); string typeName = itemType.AssemblyQualifiedName; RepositoryWebservice repo = new RepositoryWebservice(_url); byte[] resourceContent = Convert.FromBase64String( repo.GetResourceContents(this.SessionKey, itemId, typeName, resource, loginName, pass)); repo.Dispose(); return resourceContent; }