The remote server returned an error: (409) Conflict. When uploading large file
Hi pinoyz,
Thank you for your post.
Could you please tell me does the path represent the document library and filename? For example:
https://myserver/documents/mydocument.doc. Since SharePoint
dose not create attachments folder when item has been added, you would need to create this folder by yourself.
Thanks & Regards
January 29th, 2011 7:53pm
Hi,
I'm trying to upload a file to a sharepoint using a webrequest class. when I upload some 1kb to 30MB file it works okay BUT when I try to upload 50MB+ I got an error. The remote server returned an error: (409) Conflict
I have already changed the Maximum upload size and modification in web.config... but still no luck3 stars and a sun
Free Windows Admin Tool Kit Click here and download it now
January 29th, 2011 8:04pm
Hi Peng Lei,
Yes, Actually when i upload some small file it works okay but when i try to upload around 60MB or more i got that error. here's my code
Dim inData(4096) As Byte
Dim net As New Net.NetworkCredential("Marketing", "123456789", "domain1")
Dim wr As HttpWebRequest = DirectCast(WebRequest.Create("https://myserver.com/Documents/myVideo.zip"), HttpWebRequest)
wr.Method = "PUT"
wr.Credentials = Net
wr.AllowWriteStreamBuffering = True
wr.Timeout = 60000 * 90
Dim stream As IO.Stream = wr.GetRequestStream
Dim rdr As New IO.FileStream("D:\myVideo.zip", IO.FileMode.Open)
Dim bytesRead As Integer = rdr.Read(inData, 0, inData.Length)
While bytesRead > 0
stream.Write(inData, 0, bytesRead)
bytesRead = rdr.Read(inData, 0, inData.Length)
Invoke(New BytHandler(AddressOf BytMethod), bytesRead)
End While
rdr.Close()
stream.Close()
Dim response As HttpWebResponse = wr.GetResponse()
3 stars and a sun
January 29th, 2011 8:34pm