Send Form with HTTPSocket

Hi!

I have to send a http form thats looks like this way in http:

[code]

                      <table cellspacing="0" cellpadding="4" frame="box" bordercolor="#dcdcdc" rules="none" style="border-collapse: collapse;">
                      <tr>
<td class="frmHeader" background="#dcdcdc" style="border-right: 2px solid white;">Parameter</td>
<td class="frmHeader" background="#dcdcdc">Wert</td>
ArtNr:
                      <tr>
                        <td class="frmText" style="color: #000000; font-weight: normal;">Menge:</td>
                        <td><input class="frmInput" type="text" size="50" name="Menge"></td>
                      </tr>
                    
                      <tr>
                        <td class="frmText" style="color: #000000; font-weight: normal;">KdNr:</td>
                        <td><input class="frmInput" type="text" size="50" name="KdNr"></td>
                      </tr>
                    
                      <tr>
                        <td class="frmText" style="color: #000000; font-weight: normal;">SprachCode:</td>
                        <td><input class="frmInput" type="text" size="50" name="SprachCode"></td>
                      </tr>
                    
                    <tr>
                      <td></td>
                      <td align="right"> <input type="submit" value="Aufrufen" class="button"></td>
                    </tr>
                    </table>                    
                </form>[/code]

I tried with something like that, bu only get an error:

Dim form As Dictionary form = New Dictionary form.Value("ArtNr") = "13550200300.100" form.Value("Menge") = "1" form.Value("KdNr") = "" form.Value("SprachCode") = "" socket1.SetFormData(form) socket1.Post("http://www.server.com/bwwebservices/bwService1.asmx/getArtikel")

Thanks!

BR
Andreas

What error do you get?

[code]

Laufzeitfehler

body {font-family:“Verdana”;font-weight:normal;font-size: .7em;color:black;}
p {font-family:“Verdana”;font-weight:normal;color:black;margin-top: -5px}
b {font-family:“Verdana”;font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:“Verdana”;font-weight:normal;font-size:18pt;color:red }
H2 { font-family:“Verdana”;font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:“Lucida Console”;font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

<body bgcolor="white">

        <span><H1>Serverfehler in der Anwendung /bwWebServices.<hr width=100% size=1 color=silver></H1>

        <h2> <i>Laufzeitfehler</i> </h2></span>

        <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

        <b> Beschreibung: </b>Anwendungsfehler auf dem Server. Aufgrund der aktuellen benutzerdefinierten Fehlereinstellungen für diese Anwendung können die Details des Anwendungsfehlers (aus Sicherheitsgründen) nicht remote angezeigt werden. Sie können jedoch von Browsern angezeigt werden, die auf dem lokalen Server ausgeführt werden.
        <br><br>

        <b>Details:</b> Sie k&#246;nnen die Details dieser Fehlermeldung auf dem lokalen Computer anzeigen, indem Sie ein <customErrors>-Tag in der Konfigurationsdatei web.config erstellen, die sich im Stammverzeichnis der aktuellen Webanwendung befindet. Das mode-Attribut dieses <customErrors>-Tags sollte dann auf &quot;Off&quot; festgelegt werden.<br><br>

        <table width=100% bgcolor="#ffffcc">
           <tr>
              <td>
                  `


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode=&quot;Off&quot;/>
    </system.web>
</configuration>

`

              </td>
           </tr>
        </table>

        <br>

        <b>Hinweise:</b> Die aktuelle Seite kann durch eine benutzerdefinierte Fehlerseite ersetzt werden, indem Sie das defaultRedirect-Attribut des <customErrors>-Konfigurationstags dieser Anwendung so setzen, das es auf einen benutzerdefinierten Fehlerseiten-URL zeigt.<br><br>

        <table width=100% bgcolor="#ffffcc">
           <tr>
              <td>
                  `


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode=&quot;RemoteOnly&quot; defaultRedirect=&quot;mycustompage.htm&quot;/>
    </system.web>
</configuration>

`

              </td>
           </tr>
        </table>

        <br>

</body>
[/code]

At the end it says “run time error”.

Updated
Hmm seems like a server error, not your error.

There’s nothing you can do in Xojo for that. Contact your server administrator for help.

it Could also be that the server only accepts submissions from pages it has served on the same domain.

#Tim, dont think so. The form on the webside is working this way.

#Greg, yes this could be a thing. But in principle the function is ok this i make? The format which is send to the server from the Xojo App is the same as the format the http-form is sending?

Yes Greg! We were right! On the same server it works!

Thanks!

Andreas