1

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"> <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
  • 8
    Do you think it could be due to the duplicate http:// in the action? Commented May 21, 2010 at 15:36
  • 1
    Do you really have "http:/" (twice) in the action tag or is it a typo? Commented May 21, 2010 at 15:37
  • unfortunately it was a typo in my attempt to type a fake uri. Commented May 21, 2010 at 16:42

2 Answers 2

3

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

Sign up to request clarification or add additional context in comments.

3 Comments

Also, probably a noob question on my part; but ports can have more than 4 digits? I had no idea
Yes, all the way to 65535 for TCP and UDP. Port Numbers
the first half hour i indeed tried it with 1, 11, 111, 1111 as portnumbers, because 11111 looked strange to me too
2

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.

2 Comments

Fiddler is awesome for finding out things like this.
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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.