J
John
Hi,
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 =
WebRequest.Create("http://127.0.0.1/virtualdirectory/")
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
srMyReader.Close()
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)
newStream.Close()
Try
Dim response As HttpWebResponse =
CType(myReq.GetResponse(), HttpWebResponse)
Catch ex As Exception
response.Write(ex.Message)
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="http://127.0.0.1/virtualdirectory/" method="post">
<input type="submit">
</form>
which also won't execute. I am getting error
HTTP 405 - Resource not allowed
Internet Information Services
--------------------------------------------------------------------------------
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 =
WebRequest.Create("http://127.0.0.1/virtualdirectory/")
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
srMyReader.Close()
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)
newStream.Close()
Try
Dim response As HttpWebResponse =
CType(myReq.GetResponse(), HttpWebResponse)
Catch ex As Exception
response.Write(ex.Message)
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="http://127.0.0.1/virtualdirectory/" method="post">
<input type="submit">
</form>
which also won't execute. I am getting error
HTTP 405 - Resource not allowed
Internet Information Services
--------------------------------------------------------------------------------