troubleshooting Question

uploading a file from local machine to remote server using file upload in 2.0

Avatar of malik1977
malik1977Flag for United States of America asked on
14 Comments1 Solution621 ViewsLast Modified:
want to upload file to a remote server. from  my local machine using file upload. for example :        http://serverremote//upload  

 right now i can only do it locally.
any ideas what i have to do my folder on remote server is at
C:\Inetpub\wwwroot\upload  .

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        If Fileupload1.HasFile Then          

           Fileupload1.SaveAs("C:\MyDocuments\upload"  &  Fileupload1.FileName)

                Label1.Text = "Filename" & _
                Fileupload1.PostedFile.FileName & "<br/>" & _
                "File Size : " & _
                Fileupload1.PostedFile.ContentLength & "kb <br>" & _
                "content type: " & _
            Catch ex As Exception
                Label1.Text = "Error :" & ex.Message.ToString()
            End Try

I tried  My.Computer.Network.UploadFile namespace it only uploads specific file that too i am not able to doo gives an authorization error   "The remote server returned an error: (401) Unauthorized. " .

what authorization i have to follow windows as my directory on the remote server is a virtual directory?
Irwin Santos
Computer Integration Specialist

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 14 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros