I am trying to create an ASP page that processes a large block of text
that is posted to the page. The data block is approximately 500K. The
only was I can figure to get the posted text into a string is using
BinaryToString. Is there another way to just get the body of text that
is posted?
thanks for your help
john 6 2099
"coltrane" wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
:I am trying to create an ASP page that processes a large block of text
: that is posted to the page. The data block is approximately 500K. The
: only was I can figure to get the posted text into a string is using
: BinaryToString. Is there another way to just get the body of text that
: is posted?
Is it posted via the URL or in the header? I don't think there is much a
limit if posted in the header.
I wrote a VBS script to upload a file to ASP passing the name of the file,
which actually gets is using FSO and submits it as text in a textarea. The
only thing I've had to consider for large files is a timeout.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
>>Is it posted via the URL or in the header?
This is a good question. I am using IWinHttpRequest object from the
WinHttp SDK. This performs IHttpRequest->Open specifying POST. The data
is then sent using IHttpRequest->Send. The data is sent as a block of
text without any "?valuename =".
Unfortunately, this is a mix of an ASP scripting question and a
HTTPRequest COM question. argh!
I guess I can try to "sniff" the http packets.
for giggles I'll include a chunk of the C++ code:
bsUrl = "www.test.c om"
pHttp.CoCreateI nstance( __uuidof(WinHtt pRequest) );
_variant_t vEmpty;
pHttp->SetProxy( HTTPREQUEST_PRO XYSETTING_PRECO NFIG, vEmpty, vEmpty );
hr = pHttp->Open( HTTP_VERB_POST, bsUrl, _variant_t(true ) );
pHttp->put_Option( WinHttpRequestO ption_EnableRed irects,
_variant_t(bHan dleRedirect) );
pHttp->SetRequestHead er(L"Content-length", _bstr_t(szLengt h) );
pHttp->SetRequestHead er(L"Content-type", bsContentType);
m_pHttp->Send( vData );
Thanks for the feedback
John
What content type are you using?
--
--Mark Schupp
"coltrane" <te*********@ya hoo.com> wrote in message
news:11******** ************@g4 7g2000cwa.googl egroups.com... Is it posted via the URL or in the header? This is a good question. I am using IWinHttpRequest object from the WinHttp SDK. This performs IHttpRequest->Open specifying POST. The data is then sent using IHttpRequest->Send. The data is sent as a block of text without any "?valuename =". Unfortunately, this is a mix of an ASP scripting question and a HTTPRequest COM question. argh!
I guess I can try to "sniff" the http packets.
for giggles I'll include a chunk of the C++ code:
bsUrl = "www.test.c om"
pHttp.CoCreateI nstance( __uuidof(WinHtt pRequest) ); _variant_t vEmpty; pHttp->SetProxy( HTTPREQUEST_PRO XYSETTING_PRECO NFIG, vEmpty, vEmpty );
hr = pHttp->Open( HTTP_VERB_POST, bsUrl, _variant_t(true ) );
pHttp->put_Option( WinHttpRequestO ption_EnableRed irects, _variant_t(bHan dleRedirect) );
pHttp->SetRequestHead er(L"Content-length", _bstr_t(szLengt h) ); pHttp->SetRequestHead er(L"Content-type", bsContentType);
m_pHttp->Send( vData );
Thanks for the feedback
John
For data to appear in the form collection it should have a content type of
"applicatio n/x-www-form-urlencoded" and be in name/value format.
Try using that content type and pre-pending a "mydata=" to the data
(urlencode the data first). See if that works the way you expect for small
amounts of data. Then try a large chunk of data to see if this does what you
need. There may be some settings that you will have to change on the
web-server for large data posts (IIRC IIS6 restricts posts to 200k by
default).
Also, include your original problem in future posts. I don't remember
exactly what you were trying to do.
--
Mark Schupp
"coltrane" <te*********@ya hoo.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. . Mark,
Text
John
Thanks for your feedback.
Mark Schupp wrote: For data to appear in the form collection it should have a content type of "applicatio n/x-www-form-urlencoded" and be in name/value format.
Try using that content type and pre-pending a "mydata=" to the data (urlencode the data first). See if that works the way you expect for small amounts of data. Then try a large chunk of data to see if this does what you need. There may be some settings that you will have to change on the web-server for large data posts (IIRC IIS6 restricts posts to 200k by default).
Also, include your original problem in future posts. I don't remember exactly what you were trying to do.
-- Mark Schupp "coltrane" <te*********@ya hoo.com> wrote in message news:11******** **************@ g14g2000cwa.goo glegroups.com.. . Mark,
Text
John This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Vinicius |
last post by:
Hello,
how to read an input text from keyboard (on a console) by the standard
languace C, please? I really need a tip about this question.
TIA, Vinicius.
|
by: J.S. |
last post by:
I have a VB.Net Windows application that takes values inserted into
textboxes in a windows form and inserts them into various parts of a large
block of code. It concatenate the code blocks and the variables in the VB
code and generates the output code in a large multi-line textbox.
Is it possible to pull the code blocks from some text files for
concatenating with the values of the variables?
Also, is it possible to generate the output...
|
by: Saravanan |
last post by:
I need to read in a text file as strings and then write some of these strings into another text file. The output file is in the working directory while the input text file is not. how can I implement...
saran
|
by: Rajeev_nair_1981 |
last post by:
I have written a program which executes an application (netview) and logs the output into a text file.Later I open and read this file line by line using getline() function.Now I need to check whether a particular word exists in the line read from the text file.Plz help...
Below is my coding:
#include <stdio.h>
#include <dos.h>
#include <stdlib.h>
#include <time.h>
#include <conio.h>
#include <iostream>
|
by: Karl |
last post by:
How do you read a tab delimited text file? The file has 3 colums of data.
I can read fixed width text files using the left and mid functions.
I had rather not use transfer text and import specs.
| |
by: junw2000 |
last post by:
How to quickly read large C++ code with hundreds of classes, thousands
of lines?
Thanks.
Jack
|
by: sherifffruitfly |
last post by:
Hi,
I get usage statistics emailed to me weekly, and would like to analyze
the numbers. How can I read the body text of these emails into, say, a
String instance?
Thanks,
cdj
|
by: arf |
last post by:
Hello,
i have a problem where i need read dataset from text file and keep them into a vector.
e.g. dataset:
"0012 0033 00045 0044 0047"
Based on this dataset, i need to keep every 4 numbers separately into a vector.
|
by: clairePuj |
last post by:
Hi everybody,
Please can you tell me how can I read large data file (> 15 millions line) in C/C++ languge.
Thanks for your help,
Claire
|
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...
|
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,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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...
|
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...
|
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...
|
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();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |