murataydin_1412
Jan 15, 2014Nimbostratus
Downloading external data group file in v11.2.1
Hi, Im trying to download an external data file with icontrol SystemConfigSync.download_file function in v11.2.1 HF2. I get error even when the filepath and file name is true and the file has necessary permissions for read&write operations. Below is the code with some comments. I can explain further if needed. Thanks for any help.
iControl.SystemConfigSyncFileTransferContext FTC;
long size_data_dl = 30;
long offset = 0;
string[] Class_File_Name;
string[] Path2;
string[] class_name = {"dsb1garc"};
bool result = my_interface.initialize("IP", "AdminUser", "password");
my_interface.ManagementPartition.set_active_partition("Common");
Class_File_Name = my_interface.LocalLBClass.get_external_class_file_name_v2(class_name);
Path2 = my_interface.LocalLBDataGroupFile.get_cache_path(Class_File_Name);
/* first one here is Class_File_Name[0] = "/Common/dsb1garc"( i checked it with debug) */
//FTC = my_interface.SystemConfigSync.download_file(Class_File_Name[0], size_data_dl, ref offset);
/* second one here is Path2[0] = "/config/filestore/files_d/Common_d/data_group_d/:Common:dsb1garc_1" ( i checked it with debug) */
FTC = my_interface.SystemConfigSync.download_file(Path2[0], size_data_dl, ref offset
Both versions get exceptions. First one gets "Error opening file for read operation and Second one gets invalid argument exception.