Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > how to read large block of text

Reply
Thread Tools

how to read large block of text

 
 
coltrane
Guest
Posts: n/a
 
      06-15-2005
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

 
Reply With Quote
 
 
 
 
Roland Hall
Guest
Posts: n/a
 
      06-16-2005
"coltrane" wrote in message
news:(E-Mail Removed) ups.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


 
Reply With Quote
 
 
 
 
coltrane
Guest
Posts: n/a
 
      06-16-2005
>>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.com"

pHttp.CoCreateInstance( __uuidof(WinHttpRequest) );
_variant_t vEmpty;
pHttp->SetProxy( HTTPREQUEST_PROXYSETTING_PRECONFIG, vEmpty, vEmpty );

hr = pHttp->Open( HTTP_VERB_POST, bsUrl, _variant_t(true) );

pHttp->put_Option( WinHttpRequestOption_EnableRedirects,
_variant_t(bHandleRedirect) );

pHttp->SetRequestHeader(L"Content-length", _bstr_t(szLength) );
pHttp->SetRequestHeader(L"Content-type", bsContentType);

m_pHttp->Send( vData );

>>


Thanks for the feedback


John

 
Reply With Quote
 
Mark Schupp
Guest
Posts: n/a
 
      06-16-2005
What content type are you using?

--
--Mark Schupp


"coltrane" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ps.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.com"
>
> pHttp.CoCreateInstance( __uuidof(WinHttpRequest) );
> _variant_t vEmpty;
> pHttp->SetProxy( HTTPREQUEST_PROXYSETTING_PRECONFIG, vEmpty, vEmpty );
>
> hr = pHttp->Open( HTTP_VERB_POST, bsUrl, _variant_t(true) );
>
> pHttp->put_Option( WinHttpRequestOption_EnableRedirects,
> _variant_t(bHandleRedirect) );
>
> pHttp->SetRequestHeader(L"Content-length", _bstr_t(szLength) );
> pHttp->SetRequestHeader(L"Content-type", bsContentType);
>
> m_pHttp->Send( vData );
>
>>>

>
> Thanks for the feedback
>
>
> John
>



 
Reply With Quote
 
coltrane
Guest
Posts: n/a
 
      06-16-2005
Mark,

Text

John

 
Reply With Quote
 
Mark Schupp
Guest
Posts: n/a
 
      06-17-2005
For data to appear in the form collection it should have a content type of
"application/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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Mark,
>
> Text
>
> John
>



 
Reply With Quote
 
coltrane
Guest
Posts: n/a
 
      06-17-2005
Thanks for your feedback.


Mark Schupp wrote:
> For data to appear in the form collection it should have a content type of
> "application/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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
> > Mark,
> >
> > Text
> >
> > John
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Fo:Block can you check to see if a block contains any text by using the block id? morrell XML 1 10-10-2006 07:18 PM
Problem with enterprise application block - data block Showjumper ASP .Net 1 03-19-2005 03:48 PM
Block DIV within a block DIV? Noozer HTML 3 01-06-2005 10:24 PM



Advertisments