Click here to Skip to main content
15,511,776 members

Comments by Surya(10980329) (Top 9 by date)

Surya(10980329) 9-Sep-16 4:54am View    
What is tree here?
Surya(10980329) 18-Jun-15 1:35am View    
Hi Kuthuparakkal,

Thanks for your quick response. I have tried above steps but still I am getting the similar error.

I have make the protection level as EncryptSensitiveWithPassword/EncryptAllWithPassword and give the password and add same password in my .net code but from application it is giving me the below error : The runtime connection manager with the ID "{CE20AECF-AA9A-4B20-AA98-8BE230DE4327}" cannot be found. Verify that the connection manager collection has a connection manager with that ID. ContainerPOC Destination failed validation and returned error code 0xC020801B. One or more component failed validation. There were errors during task validation.

Below is my code snippet :
app = new Application();
app.PackagePassword = "suryakanta";
pkg = app.LoadPackage(pkgLocation, null);
pkgResults = pkg.Execute();
Can you please guide me here to overcome this situation ?

Appreciate your quick response.
Regards, Surya
Surya(10980329) 4-Sep-14 7:01am View    
Could you please share me some code for reference ?
Surya(10980329) 4-Sep-14 3:00am View    
Hi Mehdi,

Good day. Need your help on full extract of a .tar.gz file.

I am using below code, but at point of extract to destination folder(line 4) it is giving me the error "Error base InputStream GZIP header, first byte doesn't match"

Stream inStream = File.OpenRead(gzArchiveName);
Stream gzipStream = new GZipInputStream(inStream);

TarArchive tarArchive = TarArchive.CreateInputTarArchive(gzipStream);
tarArchive.ExtractContents(destFolder);
tarArchive.CloseArchive();

gzipStream.Close();
inStream.Close();

Can you please help on this one ?

Thanks in advance.

Regards, Surya
Surya(10980329) 20-Aug-14 3:07am View    
Thanks Mehdi for getting back.

I am currently using below code to search a particular file from the .tar.gz file but it is taking too much time to finish the search and my page getting timeout.

My main objective is to search a file in the .tar.gz file, if available then only extract else not.

Can you please guide me here on how I can fast the search in minimum time ?

Thanks in advance.

Regards, Surya

//Code

using (TarInputStream tarIn = new TarInputStream(new GZipInputStream(File.OpenRead(filename[0]))))
{
TarEntry theEntry;
while ((theEntry = tarIn.GetNextEntry()) != null)
{

if (theEntry.IsDirectory)
{
continue;
}
else
{

if (!string.IsNullOrEmpty(theEntry.Name) && !(theEntry.IsDirectory))
{

if (theEntry.Name.IndexOf(ZipFileName) > 0)
{
string strNewFile = @"" + OutputPath + @"\" + ZipFileName;
if (File.Exists(strNewFile))
{
continue;
}

using (FileStream streamWriter = File.Create(strNewFile))
{
int size = 2048;
byte[] data = new byte[2048];
while (true)
{
size = tarIn.Read(data, 0, data.Length);
if (size > 0)
streamWriter.Write(data, 0, size);
else
break;
}
streamWriter.Close();
}
}
}
}

}
tarIn.Close();
}