Hello,
I am using the code below to upload a file to a server running windows IIS 5.1.
I am just testing on my own computer to see if this works ok. However, I keep getting the following error message:
I am sure this is a IIS problem maybe something to so with permissions. However, I am configure the virtual directory to allow read, write, and directory browsing.Code:The remote server returned an error (405) Method Not Allowed
The config.xml file I am trying to upload is located in the same directory as the executable and does exist.
Many thanks for any advice,Code:Private Sub upload_config_to_server() Dim url As New Uri("http://localhost/softphone/config.xml") Dim wc As New WebClient() If Not wc.IsBusy Then Try wc.UploadFile(url, Nothing, "config.xml") Catch webex As WebException Console.WriteLine("Web Exception {0}", webex.Message) Catch ex As Exception Console.WriteLine("Exception {0}", ex.Message) End Try End If End Sub




Reply With Quote