System.Net.
request.Credentials =
{
Stream data = response.GetResponseStream();
File.Delete(targetPath);
bytesRead = data.Read(byteBuffer, 0, byteBuffer.Length);
output.Write(byteBuffer, 0, bytesRead);
}