I have a server configured to receive XML files via POST, parse them, and display some info accordingly. The server works perfectly and has been tested extensively.
I have two clients for this server. In both, I have hardcoded some well-formed XML. When the first client sends its post message, the server responds perfectly.
When the second, sends it’s post message, the server responds with an error (below).
This is despite both clients
- Running the same code
- Posting the same XML
Here is the code used to send the POST :
public void SendPost(string xmlInfo)
{
ErrorHandler.Execute(() => {
XMLHTTP objhttp = new XMLHTTP();
objhttp.open("POST", Properties.Settings.Default.postpath, false, "", "");
objhttp.send(xmlInfo);
var x = XElement.Parse(objhttp.responseText);
});
}
}
The problem is not in the sent XML (it is hardcoded and exactly the same in both cases) and it is not on the Server as this will respond perfectly and has been tested a lot. What could be causing my problem ?
The error message is now :
An error occurred on the server when processing the URL. Please
contact the system administrator. If you are the system
administrator please click here to find
out more about this error.
If your server is responding with code 500 (which signals “internal error”) then the problem almost certainly is in the server – or at least, there’s probably a problem in the server.
You should have a look at the logs of the server receiving the data – I’d hope that any well-written server would dump diagnostics (e.g. exceptions) to the log on failure.
(“Tested a lot” doesn’t mean “has no conceivable failure modes”…)