T
tregewitz
I am uploading a zip file using an HttpWebRequest and a PUT operation
to Sharepoint (2003) from a Windows Form application. When I upload
the same file using the Sharepoint Portal Web UI itself, the file
uploads in 1/3 the time. If I copy the file over the network using
Windows Explorer, it also copies in about 1/3 of the time.
I don't understand why it is taking so much longer transferring it in
this way.
I've tried several variations of this code, but there's no difference:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Credentials = userNetworkCredentials;
request.Method = "PUT";
request.ContentType = "application/octet-stream";
request.ContentLength = data.Length;
Stream stream = request.GetRequestStream();
stream.Write(data,0,data.Length);
stream.Close();
response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
temp = reader.ReadToEnd();
reader.Close();
Anybody know a way to improve the performance?
to Sharepoint (2003) from a Windows Form application. When I upload
the same file using the Sharepoint Portal Web UI itself, the file
uploads in 1/3 the time. If I copy the file over the network using
Windows Explorer, it also copies in about 1/3 of the time.
I don't understand why it is taking so much longer transferring it in
this way.
I've tried several variations of this code, but there's no difference:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Credentials = userNetworkCredentials;
request.Method = "PUT";
request.ContentType = "application/octet-stream";
request.ContentLength = data.Length;
Stream stream = request.GetRequestStream();
stream.Write(data,0,data.Length);
stream.Close();
response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
temp = reader.ReadToEnd();
reader.Close();
Anybody know a way to improve the performance?