|
|
|
date: Wed, 30 Jan 2008 13:12:02 -0800,
group: microsoft.public.platformsdk.internet.server.isapi-dev
back
IRequest.BinaryRead returns 0x8004005 for > 1MB file
Hello,
I'm using ISAPI dll to uplaod the file. It successfully uploads the file for
smaller file. For file > 1 MB BinaryRead fails.
I've confirmed the IIS parameters AspMaxRequestEntityAllowed,
AspBufferingLimit in metabase.xml. Both are set to 1GB. I've set these values
using script on msdn site and restarted IIS, but it didn't help.
This code is working in every client except this one.
Any clues will be helpful.
Thank you
Below is code snippet:-
*********************
CComVariant vt;
bool bContinue = true;
try
{
long cbTotal;
hr = m_pRequest->get_TotalBytes(&cbTotal);
if(FAILED(hr))
{
nError =7;
strError.Format(_T("get_TotalBytes:%ld, %X"), cbTotal, hr);
throw _com_error(hr);
}
CComVariant vTotal(cbTotal);
hr = m_pRequest->BinaryRead(&vTotal, &vt);
if(FAILED(hr))
{
nError =8;
strError.Format(_T("BinaryRead:%X, TotalBytes:%ld"), hr, cbTotal);
throw _com_error(hr);
}
.....
***************
date: Wed, 30 Jan 2008 13:12:02 -0800
author: Vaquar
Re: IRequest.BinaryRead returns 0x8004005 for > 1MB file
This is network IO. You should not block and read 1MB chunks at a
time. Read smaller chunks in a loop.
If you are writing ISAPI, you can directly use peCB->ReadClient() to
get the data. I don't know what m_pRequest is, but it is not ISAPI.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
On Jan 30, 1:12 pm, Vaquar wrote:
> Hello,
> I'm using ISAPI dll to uplaod the file. It successfully uploads the file for
> smaller file. For file > 1 MB BinaryRead fails.
> I've confirmed the IIS parameters AspMaxRequestEntityAllowed,
> AspBufferingLimit in metabase.xml. Both are set to 1GB. I've set these values
> using script on msdn site and restarted IIS, but it didn't help.
>
> This code is working in every client except this one.
> Any clues will be helpful.
>
> Thank you
>
> Below is code snippet:-
> *********************
> CComVariant vt;
> bool bContinue = true;
> try
> {
> long cbTotal;
> hr = m_pRequest->get_TotalBytes(&cbTotal);
> if(FAILED(hr))
> {
> nError =7;
> strError.Format(_T("get_TotalBytes:%ld, %X"), cbTotal, hr)> throw _com_error(hr);
> }
> CComVariant vTotal(cbTotal);
> hr = m_pRequest->BinaryRead(&vTotal, &vt);
> if(FAILED(hr))
> {
> nError =8;
> strError.Format(_T("BinaryRead:%X, TotalBytes:%ld"), hr, cbTotal);
> throw _com_error(hr);
> }
> .....
> ***************
date: Tue, 26 Feb 2008 19:24:02 -0800 (PST)
author: David Wang
|
|