473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Sending data to webserver

Hi,

In an old eVB program, it sends data to a ASP program with this:

dim xmlHTTP as XMLHTTPRequest
set xmlHTTP = CreateObject("Microsoft.XMLHTTP")
xmlHTTP.Open "POST", url-string, False
xmlHTTP.Send

result = xmlHTTP.ResponseText

Now I am trying to rewrite the program to vb.NET 2005, but XMLHTTPRequest is
unknown.

I assumed I needed:

dim xmlHTTP as Net.HttpWebRequest
dim Result as Net.HttpWebResponse

urlstring = "...."

xmlHTTP = Net.HttpWebRequest.Create(urlstring)
xmlHTTP.TimeOut = 20000
result = xmlHttp.GetResponse
resulttext = result.StatusDescription

The ASP page on the server responds with either "ACK" or "NACK" and for the
eVB program is works, but my result is "OK"

Where am I going wrong here?

rg,
Eric
Mar 10 '06 #1
2 11643
I didn't mention the url: it is something like
'http://mypage.asp?arg1=1&arg2=2&arg3=3'

so the data I send to the server is not a file, but the arguments in the
URL.

I'm wondering if Net.HttpWebRequest is the right way to do this...

rg,
Eric

"Eric" <so*****@MicroZoft.com> schreef in bericht
news:44**********************@text.nova.planet.nl. ..
Hi,

In an old eVB program, it sends data to a ASP program with this:

dim xmlHTTP as XMLHTTPRequest
set xmlHTTP = CreateObject("Microsoft.XMLHTTP")
xmlHTTP.Open "POST", url-string, False
xmlHTTP.Send

result = xmlHTTP.ResponseText

Now I am trying to rewrite the program to vb.NET 2005, but XMLHTTPRequest
is unknown.

I assumed I needed:

dim xmlHTTP as Net.HttpWebRequest
dim Result as Net.HttpWebResponse

urlstring = "...."

xmlHTTP = Net.HttpWebRequest.Create(urlstring)
xmlHTTP.TimeOut = 20000
result = xmlHttp.GetResponse
resulttext = result.StatusDescription

The ASP page on the server responds with either "ACK" or "NACK" and for
the eVB program is works, but my result is "OK"

Where am I going wrong here?

rg,
Eric

Mar 10 '06 #2
found it...

found my sollution at
http://www.dotnet247.com/247referenc...netscrape2.asp

"Eric" <so*****@MicroZoft.com> schreef in bericht
news:44**********************@text.nova.planet.nl. ..
I didn't mention the url: it is something like
'http://mypage.asp?arg1=1&arg2=2&arg3=3'

so the data I send to the server is not a file, but the arguments in the
URL.

I'm wondering if Net.HttpWebRequest is the right way to do this...

rg,
Eric

"Eric" <so*****@MicroZoft.com> schreef in bericht
news:44**********************@text.nova.planet.nl. ..
Hi,

In an old eVB program, it sends data to a ASP program with this:

dim xmlHTTP as XMLHTTPRequest
set xmlHTTP = CreateObject("Microsoft.XMLHTTP")
xmlHTTP.Open "POST", url-string, False
xmlHTTP.Send

result = xmlHTTP.ResponseText

Now I am trying to rewrite the program to vb.NET 2005, but XMLHTTPRequest
is unknown.

I assumed I needed:

dim xmlHTTP as Net.HttpWebRequest
dim Result as Net.HttpWebResponse

urlstring = "...."

xmlHTTP = Net.HttpWebRequest.Create(urlstring)
xmlHTTP.TimeOut = 20000
result = xmlHttp.GetResponse
resulttext = result.StatusDescription

The ASP page on the server responds with either "ACK" or "NACK" and for
the eVB program is works, but my result is "OK"

Where am I going wrong here?

rg,
Eric


Mar 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: UrgeOverkill | last post by:
I'm having a problem sending data from a socket server. The server side reports that it has sent 4845 bytes but the client reports only 1448 bytes received. The kicker is that this ONLY happens...
1
by: Daniel | last post by:
after opening socket, sending data then closing socket 3000 times i get "Only one usage of each socket address" what am i doing wrong? is there some thing else i need to do to free up the socket...
4
by: David | last post by:
I'm wondering if python is capable of fairly precise timing and also sending data out the parallel port. For example ; making a 7.5 KHz square wave come out of one of the data pins on the...
9
by: MNQ | last post by:
Hi All I want to use my parallel port of my PC to control some external devices. I am writing a program in ANSI C using the PacificC compiler. What I need to know is how to access the parallel...
4
by: yaron | last post by:
Hi, I have a problem when sending data over TCP socket from c# client to java server. the connection established ok, but i can't send data from c# client to java server. it's work ok with...
2
by: Eric | last post by:
Hi, In an old eVB program, it sends data to a ASP program with this: dim xmlHTTP as XMLHTTPRequest set xmlHTTP = CreateObject("Microsoft.XMLHTTP") xmlHTTP.Open "POST", url-string, False...
0
by: vladimir.plotnikov | last post by:
Hello! I have problem: I have IPB forum installed. After search in IPB (search takes about 3-4 seconds for post table about 300 000 records) mysql shows "Sending Data" status and takes about...
1
by: Charlie | last post by:
Hi: I need a way to test my TcpListner, but not sure what applications are sending data to tcp ports. How about Email or Instant Messenger? If they are tcp, what ports are they sending data...
5
by: Navin Mishra | last post by:
Hi, In load test of our .NET 2.0 socket application on Win2003 server, we are seeing sometimes WSEWOULDBLOCK error when sending data to clients. We are using synchronoous scokets with...
3
by: Mateo | last post by:
(As.Net 1.1 framework!) Hi! So, I have problem as described in subject. Here is source code:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.