By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,704 Members | 985 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,704 IT Pros & Developers. It's quick & easy.

The remote server returned an error: (405) Method Not Allowed.

P: n/a

I am getting this error message
The remote server returned an error: (405) Method Not Allowed.
while trying to execute the following code:
Dim myReq As HttpWebRequest =
myReq.ContentType = "application/x-www-form-urlencoded"
myReq.Method = "POST"
Dim Tmp As String
Dim srMyReader As New StreamReader("C:\Temp\appupdater.xml")
Tmp = srMyReader.ReadToEnd
Dim encodedData As New System.Text.UTF8Encoding
Dim byteArray As Byte() = encodedData.GetBytes(Tmp)
Dim newStream As Stream = myReq.GetRequestStream()
newStream.Write(byteArray, 0, Tmp.Length)

Dim response As HttpWebResponse =
CType(myReq.GetResponse(), HttpWebResponse)
Catch ex As Exception
End Try

I am trying to upload xml file to virtual directory.
I checked IIS/Configuration/aspx is limited to GET,HEAD,POST,DEBUG
What else could cause this error?
I also created much simpler html code
<form name="somename" target="sometarget"
action="" method="post">

<input type="submit">
which also won't execute. I am getting error
HTTP 405 - Resource not allowed
Internet Information Services


Sep 11 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.