I have an http url from where i am able to list the directory and i have all the permissions to the HTTP directory. (Winform application)
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(http:///abc/def/); request.Credentials = new NetworkCredential("username","password");
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
using (StreamReader reader = new StreamReader(response.GetResponseStream()))
{
string html = reader.ReadToEnd();
long FolderSize = response.ContentLength;
}
}
I am getting 611 as content length. But i want to get the folder size in which the file exists. Please help.