Receiving POST data using vb .net

Posted on 2010-01-13
Medium Priority
Last Modified: 2013-12-17
I want to send data between two computers connected to the Web.
Sending the data seems easy using POST, e.g.:

Dim web As New System.Net.WebClient()

        web.Headers.Add("Content-Type", "application/x-www-form-urlencoded")

        Dim d As Byte() = System.Text.Encoding.ASCII.GetBytes("SEARCHSTRING=test")
        Dim res As Byte() = web.UploadData("", "POST", d)

How do I write a VB routine to listen for and receive this POST?

(I want to reply with a short text string)

Many Thanks.

Question by:alexking
LVL 26

Accepted Solution

jar3817 earned 2000 total points
ID: 26345212
You basically need to implement a web server. Your app needs to listen on port tcp/80 and accept incoming connections. Here is a site that has source code in vb.net for a simple web server:


Author Closing Comment

ID: 31676653
Thank you  - life now wears a sweeter smile!

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question