Hello
I have referred below article :
and customized code as per my requirements as below : (Button click event)
It works fine on my local machine but as I have added URL path of remote server It gives error as :URI formats are not supported
How to resolve this problem
try
{
using (ZipFile zip = new ZipFile())
{
zip.AlternateEncodingUsage = ZipOption.AsNecessary;
zip.AddDirectoryByName("KMLFiles");
con.Close();
SqlCommand cmd = new SqlCommand("select FilePath from FileMaster where FileType='KML'", con);
con.Open();
SqlDataReader sdr = cmd.ExecuteReader();
if (sdr.HasRows)
{
while (sdr.Read())
{
string filePath = "http://revolutionit-004-site69.htempurl.com/" + sdr.GetValue(0).ToString();
zip.AddFile(filepath, "KMLFiles");
}
}
}