Problem with webclienet class uploadfile method?
-
I have tried webclient class uploadfile method to upload files to server as, Dim fs As New WebClient Dim retValue As Byte() retValue = fs.UploadFile("http:\\\srcfile", "POST", "c:\srcfile") I got exception as, The remote server returned an error: (401) Unauthorized. Let me know how to solve this error, and upload files to server using webclient.
Be simple and Be sample.
-
I have tried webclient class uploadfile method to upload files to server as, Dim fs As New WebClient Dim retValue As Byte() retValue = fs.UploadFile("http:\\\srcfile", "POST", "c:\srcfile") I got exception as, The remote server returned an error: (401) Unauthorized. Let me know how to solve this error, and upload files to server using webclient.
Be simple and Be sample.
Check ASP.NET is having write permission on c:\srcfile ? Try server.mappath for the server directory
printf("Navaneeth!!") www.w3hearts.com