Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
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   
It is possible that the AppPool has limited memory. Can we increase apppool 
memory ?

Other thing I am thinking to change code to read in small chunk, instead of 
BinaryRead() for Total_Bytes.

Vaquar
date: Mon, 4 Feb 2008 07:17: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

Re: IRequest.BinaryRead returns 0x8004005 for > 1MB file   
Thanks David,
 I've changed the code to read in chunk which has solved the problem.

1) What is peCB->ReadClient() ?

2) m_pRequest is IRequest* : an ASP Intrinsics built-in object Application, 
Session, Server, Request, and Response objects (as per msdn)
date: Wed, 27 Feb 2008 07:05:03 -0800   author:   Vaquar

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us