Since posting the original message I have been trying all the options that I can think of without any success.
This includes adding write permissions to almost everything to all the update to XF2.2.
Have I missed something obvious?
I am running on a shared server and the response that I am getting is
HttpError, Err Number = : 5::0System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.GetResponse()
at forum_xentest.Page_Load(Object sender, EventArgs e) in C:\Users\Nigel\Documents\My Web Sites\gognet\forum\xentest.aspx.vb:line 31:
The test program that I am using is:
Partial Class forum_xentest
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim apistring As String = ""
Dim xenheaders As New System.Net.WebHeaderCollection
xenheaders.Add("XF-Api-Key", "XcRGYtvJiDbQQ6FO5vgAgjqH_AJwlzZi")
Dim apifulluri As New Uri("
https://www.gauge0guildarchive.com/proofxenforo/index.php/api/users/2/")
Dim apirequest As Net.HttpWebRequest = Net.WebRequest.Create(apifulluri)
apirequest.Method = "POST"
apirequest.Headers = xenheaders
If apirequest.Method = "POST" Then
apirequest.SendChunked = True
Dim byte1 As Byte() = Text.Encoding.UTF8.GetBytes("username=Melson1234&password=melson&email=
melson@nsquared.net")
' Set the content type of the data being posted.
apirequest.ContentType = "application/x-www-form-urlencoded"
' Set the content length of the string being posted.
apirequest.ContentLength = byte1.Length
Dim newStream As IO.Stream = apirequest.GetRequestStream()
newStream.Write(byte1, 0, byte1.Length)
newStream.Close()
End If
Try
Dim apiresponse As Net.HttpWebResponse = apirequest.GetResponse()
Dim apistream As IO.Stream = apiresponse.GetResponseStream()
Dim encode As Encoding = System.Text.Encoding.GetEncoding("utf-8")
Dim readStream As New IO.StreamReader(apistream, encode)
Dim read(256) As [Char]
Dim count As Integer = readStream.Read(read, 0, 256)
While count > 0
' Dumps the 256 characters to a string
Dim str As New [String](read, 0, count)
apistring += str
count = readStream.Read(read, 0, 256)
End While
apistream.Close()
apiresponse.Close()
TextBox1.Text = apistring
Catch
TextBox1.Text = "HttpError, Err Number = : " & Err().Number.ToString & "::" & Err.Erl.ToString & Err.GetException.ToString & ":<br />" & Now()
End Try
End Sub
End Class