473,698 Members | 2,132 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Request received well, returning it results in loss of data!

I'm doing a simple test, about 100 lines of data of ~200 bytes each.
I'm using WebRequest() and HttpWebResponse () calling a generic handler.

What i pass to the webserver (tried local as not local) i return directly
using Response.Write( ) per line.
The server receives the data 100% ok.

Both client as server use application/x-www-form-urlencoded.
The data is sent as POST and is ASCII encoded.
item1=data.... etc..

In the handler a loop for each item is used and sent with Response.Write( ).
Each item is seprated using &
Using 2 local VWD projects results in having up to item #52 being correct.
The rest is gone.
The non-local webserver return only 8 items!!

The oddity is that Response.flush results in no items.
Is this a timing issue?
Dec 30 '05 #1
5 1539
Hello Edwin,
I'm doing a simple test, about 100 lines of data of ~200 bytes each.
I'm using WebRequest() and HttpWebResponse () calling a generic
handler.

What i pass to the webserver (tried local as not local) i return
directly
using Response.Write( ) per line.
The server receives the data 100% ok.
Both client as server use application/x-www-form-urlencoded. The data
is sent as POST and is ASCII encoded. item1=data.... etc..

In the handler a loop for each item is used and sent with
Response.Write( ).
Each item is seprated using &
Using 2 local VWD projects results in having up to item #52 being
correct.
The rest is gone.
The non-local webserver return only 8 items!!
The oddity is that Response.flush results in no items. Is this a
timing issue?


Can you post your code?

--
Joerg Jooss
ne********@joer gjooss.de
Jan 1 '06 #2
That would be difficult at this time.
However, these are two apps using urlencoding (item=data...) etc
I use a generic handler and return the same date immediately.

If you insist on code.. i have to make something i can release then.

:)
"Joerg Jooss" <ne********@joe rgjooss.de> schreef in bericht
news:94******** *************** **@msnews.micro soft.com...
Hello Edwin,
I'm doing a simple test, about 100 lines of data of ~200 bytes each.
I'm using WebRequest() and HttpWebResponse () calling a generic
handler.

What i pass to the webserver (tried local as not local) i return
directly
using Response.Write( ) per line.
The server receives the data 100% ok.
Both client as server use application/x-www-form-urlencoded. The data
is sent as POST and is ASCII encoded. item1=data.... etc..

In the handler a loop for each item is used and sent with
Response.Write( ).
Each item is seprated using &
Using 2 local VWD projects results in having up to item #52 being
correct.
The rest is gone.
The non-local webserver return only 8 items!!
The oddity is that Response.flush results in no items. Is this a
timing issue?


Can you post your code?

--
Joerg Jooss
ne********@joer gjooss.de

Jan 1 '06 #3
Hello Edwin,
That would be difficult at this time.
However, these are two apps using urlencoding (item=data...) etc
I use a generic handler and return the same date immediately.
If you insist on code.. i have to make something i can release then.


Well, "insisting" is a pretty strong term, but I'd rather not blindly guess
;-)

Cheers,
--
Joerg Jooss
ne********@joer gjooss.de
Jan 2 '06 #4

Back again, i could manage a smaller fragment which obtains the response
data.
It should be enough to understand the problem imo.

We *respond* with "applicatio n/x-www-form-urlencoded"
In the ashx file i respond with: (the StrDup is not used, i tried sending a
byte array later on)

T = Microsoft.Visua lBasic.Strings. StrDup(60000, "A")
.Response.Write ("item1=len( T): " &
T.Length.ToStri ng)
'.Response.Writ e("&item2=" & T)

Dim b(99999) As Byte
For nItem As Int32 = 0 To b.Length - 1
b(nItem) = 65
Next
.Response.Write ("&item2=")
.Response.Binar yWrite(b)
ContentLength is: 100026
Dim nLen As Int32 = oHTTPResponse.C ontentLength
If nLen > 0 Then

ReDim data(nLen - 1)
oStream = oHTTPResponse.G etResponseStrea m()
oStream.Read(da ta, 0, nLen)
oStream.Close()
oStream.Dispose ()
oStream = Nothing

Dim a As Int32
Dim nItem As Int32

For nItem = 0 To data.Length - 1
If data(nItem) = 0 Then
Stop
Exit For
End If

Next
The for/next loop stops at: 8760

As you see it's no a decoding issue, i guess the data is chunked internally
and due some reason char 0 is inserted or so.

"Joerg Jooss" <ne********@joe rgjooss.de> schreef in bericht
news:94******** *************** **@msnews.micro soft.com...
Hello Edwin,
That would be difficult at this time.
However, these are two apps using urlencoding (item=data...) etc
I use a generic handler and return the same date immediately.
If you insist on code.. i have to make something i can release then.


Well, "insisting" is a pretty strong term, but I'd rather not blindly
guess ;-)

Cheers,
--
Joerg Jooss
ne********@joer gjooss.de

Jan 6 '06 #5
Hmm, i just rewrote it to:

http://66.249.93.104/search?q=cache:...ASP..NET&hl=nl

And it seems to work as intended :)
Testing...
"Edwin Knoppert" <ne**@hellobasi c.com> schreef in bericht
news:43******** *************** @text.nova.plan et.nl...

Back again, i could manage a smaller fragment which obtains the response
data.
It should be enough to understand the problem imo.

We *respond* with "applicatio n/x-www-form-urlencoded"
In the ashx file i respond with: (the StrDup is not used, i tried sending
a byte array later on)

T = Microsoft.Visua lBasic.Strings. StrDup(60000,
"A")
.Response.Write ("item1=len( T): " &
T.Length.ToStri ng)
'.Response.Writ e("&item2=" & T)

Dim b(99999) As Byte
For nItem As Int32 = 0 To b.Length - 1
b(nItem) = 65
Next
.Response.Write ("&item2=")
.Response.Binar yWrite(b)
ContentLength is: 100026
Dim nLen As Int32 = oHTTPResponse.C ontentLength
If nLen > 0 Then

ReDim data(nLen - 1)
oStream = oHTTPResponse.G etResponseStrea m()
oStream.Read(da ta, 0, nLen)
oStream.Close()
oStream.Dispose ()
oStream = Nothing

Dim a As Int32
Dim nItem As Int32

For nItem = 0 To data.Length - 1
If data(nItem) = 0 Then
Stop
Exit For
End If

Next
The for/next loop stops at: 8760

As you see it's no a decoding issue, i guess the data is chunked
internally and due some reason char 0 is inserted or so.

"Joerg Jooss" <ne********@joe rgjooss.de> schreef in bericht
news:94******** *************** **@msnews.micro soft.com...
Hello Edwin,
That would be difficult at this time.
However, these are two apps using urlencoding (item=data...) etc
I use a generic handler and return the same date immediately.
If you insist on code.. i have to make something i can release then.


Well, "insisting" is a pretty strong term, but I'd rather not blindly
guess ;-)

Cheers,
--
Joerg Jooss
ne********@joer gjooss.de


Jan 6 '06 #6

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

Similar topics

2
2455
by: Sean Dotson | last post by:
I have a form that passes variables to an asp file and then uploads a file. For some reason the request.form is not getting the info from the form. It's returning blanks. Any insight would be appreciated.... Here is the asp file <HTML> <HEAD> <TITLE>File Upload Results</TITLE>
10
2190
by: William L. Bahn | last post by:
I'm looking for a few kinds of feedback here. First, there is a program at the end of this post that has a function kgets() that I would like any feedback on - including style. Second, for those that are interested, I present an outline of the approach I am looking at using in class this semester. I would be very interesting in any feedback on that, but if you are not interested, feel free to skip over it.
4
3153
by: James Johnson | last post by:
Dear C#Dex, I am trying to automate a POST to a web page that clicks a button. I have been able to hit a target web page and run the web page. However, the button on the page does not click. I can set the target web page to change to a new URL when I hit it, and that works, but I cannot get the button to click based on my POST command. Is there some secret to clicking the button? I have a button named btnGo and I set the value of...
4
1575
by: Peter Strøiman | last post by:
Hi. I have an ASP page that will receive a lot of post data ( sometimes many MB! ). The ASP page processes the data sequentially, but does not need the entire data stored in memory. Therefore it is cruicial that executing the ASP page doesn't wait for the entire request to arrive. Then I would just begin to chunk my way through the Request.InputStream.
0
1369
by: Mike Nolan | last post by:
I received the following note on another database-oriented list. This may be something that pg users could help in, though I'll also pass on the caveat that the other list had, that I have no direct knowledge about the institution or the researchers. -- Mike Nolan --------------------------------------------------------------------------
4
2167
by: customerservice | last post by:
I have been tracking website traffic on my site www.grabbagvideo.com:84 and also https://www.grabbagvideo.com for a few weeks now. I am using the request.browser.crawler property in attempt to track crawlers to our auditions and casting call site. However whether the request is recieved at www.grabbagvideo.com or https://www.grabbagvideo.com the log always returns false. However when I do an dns query on host they return inkotomi.com...
25
11285
by: Matt Kruse | last post by:
According to HTTP/1.1 specs, a client should only have two connections open to the host at a time (which can be changed by browser users, of course). When using xmlHttpRequest connections, is there any way to detect that the request is queued? I did some tests (see "Queued Requests" at http://www.ajaxtoolbox.com/request/examples.php ) and it looks like readyState 1 is fired immediately after the request is made, even though it's not...
0
1040
by: comp.text.xml | last post by:
Hi all, I'm using SOAP tool kit version 3 in my application. When analyzed SOAP responses closely using the Fiddler I noticed that the data we sent (a XML in this case) is again repeated in the response. Ie, the same data we sent to the server is returned back to the client again. My response from the server is sent within a <Resulttags and after
0
1307
by: LizRickaby | last post by:
My client has several Access databased that they wanted converted into MSSQL to be able to access them online (excuse the pun). I added the first Access database, LenderPrograms, as a table in the MSSQL database with no problem, it runs fine. But when I tried to add the other Access database, LenderContacts, as another table, it doesn't work. When I first import LenderContacts using Enterprise Manager it turns all of the "text" fields into...
0
8672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8892
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8860
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7712
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2323
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.