tags:

views:

66

answers:

2

i'm flabbergasted,

i've looked at almost every example, but it just doesn't work (the other party says they don't receive my data in the request parameter)

I want to do this in code (send some xml data (without the xml declaration) to a uri):

<form method="post" action="http://100.100.100.100:11111/getinfo"&gt;

<input type="text" value="<ps:Balance>100</ps:Balance>" name="request" id="request">
<br><br>
<input type="submit" value="go">
</form>

EDIT the double http was a typo

EDIT 2: i obviously wasn't very clear in my hurry to ask the question: what i typed here is HTML, and when i open that html in IE and click the submit button, i get a reply from the server that the data (with the name 'request') was received. But now i want to get the same result in my C# code: post this string "100 as post-value and 'request' as post-key to the action uri.

+3  A: 

Why do you have http:// twice? http://http://100.100.100.100:11111/getinfo ?

Bradley Mountford
Also, probably a noob question on my part; but ports can have more than 4 digits? I had no idea
Pierreten
Yes, all the way to 65535 for TCP and UDP. [Port Numbers](http://www.iana.org/assignments/port-numbers)
Michael Todd
the first half hour i indeed tried it with 1, 11, 111, 1111 as portnumbers, because 11111 looked strange to me too
Michel
+2  A: 

Ignoring the double http:, you are not in anyway using c#, that is just an html form. Unless something like a proxy is stripping out your data, it must be posting to the URL, you HTML is too simple for it not to be. Perhaps you have named the form field incorectly. If you use something like fiddler you can inspect the raw request and response, all the posted variables, http headers everything. You can then see exactly what is being posted to the uri.

Ben Robinson
Fiddler is awesome for finding out things like this.
Rangoric
see my edit: i wasn't to clear in my question; the above html is actually working, i'm looking to accomplish the same in C# code.
Michel