Re: ISAPI extension fails with "An attempt was made to reference a token that does not exist" during WriteFile
From: asit (asitkharshikar_at_gmail.com)
Date: 10/25/04
- Next message: Scott Roberts: "RE: Can't install IIS on fresh Slipstreamed XP SP2"
- Previous message: bernadou: "Re: Newbe: Can't create site w/host name"
- Maybe in reply to: asit: "ISAPI extension fails with "An attempt was made to reference a token that does not exist" during WriteFile"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 26 Oct 2004 00:10:54 +0530
As an addendum i also get some additional errors during read io completion.
These are mostly network related.
0x79 - The semaphore timeout period has expired
0x40 - The specified network name is no longer available
- asit
"asit" <asitkharshikar@gmail.com> wrote in message
news:e1cb2UQuEHA.3460@TK2MSFTNGP15.phx.gbl...
> Attached the log and some code as a zip.
> - asit
>
> "asit" <asitkharshikar@gmail.com> wrote in message
> news:ea3IkKQuEHA.1372@TK2MSFTNGP14.phx.gbl...
> > Hello David,
> >
> > Thanks for your response. Actually it does function correctly with the
> > thread pool disabled. When I say the thread pool is disabled I mean that
I
> > don't create additional threads in my extension. All work in done in the
> > context of HttpExtensionProc. This behavior is seen with simultaneous
> > requests underway. Yes, you are right, it's not file system related,
> > actually it works for sometime before failing during ReadIoCompletion
with
> > 0x3f0 as
> > the last error. I do the writing to disk in this function but its not
> > actually WriteFile, sorry for the mixup. Identity token in use should
> belong
> > to the IWAM_<machinename> account as the extension is run medium pooled.
I
> > don't do any impersonation in this version.
> > IIS version : 5.0 OS: Windows 2000
> >
> > Here is the sequence of events and api's in use.
> >
> > HttpExtensionProc()
> >
> > RecvFileWorker()
> >
> > Allocate a buffer for data
> > CreateFile() - Create a new file
> > // set a call back function and context for async io
> > bResult=pRecv->pecb->ServerSupportFunction(pRecv->pecb->ConnID,
> > HSE_REQ_IO_COMPLETION,
> > ReadIoCompletion, 0,
> > (LPDWORD) pRecv);
> >
> > // Read data
> > bResult = pRecv->pecb->ServerSupportFunction(pRecv->pecb->ConnID,
> > HSE_REQ_ASYNC_READ_CLIENT,
> >
> > ReadIoCompletion(dwError)
> >
> > If (dwError == Error_Success)
> > WriteFile()
> >
> > // Read more data ...
> > bResult=pecb->ServerSupportFunction(pecb->ConnID,
> > HSE_REQ_ASYNC_READ_CLIENT ...
> >
> > Else
> > // *** fails here with 3F0 as the last error. ***
> >
> > I have attached a copy of io.cpp which has code for RecvFileWorker()
> > and the log with the error. Please search for the string
> "ReadIoCompletion:
> > Err: HSE_REQ_ASYNC_READ_CLIENT (0x3f0)" below.
> >
> > Let me know if you need additional information, thanks again for
> responding
> > !
> >
> > Regards
> > - Asit
> > Log snippet:
> > 9/21/2004 11:15:13 AM: ReadIoCompletion: Read (8192), nBufIndex (0)
> > 9/21/2004 11:15:13 AM: ReadIoCompletion: pRecv->nRead = 2703360,
> > pecb->cbTotalBytes =
> > 9/21/2004 11:15:13 AM: UploadStats::SetStatus:
> > b7d47a29-7afe-4c67-a4da-0f42a4de5128 , msg = <msg>1</msg>
> > 9/21/2004 11:15:13 AM: ReadMoreData: nRead=2703360,
> > TotalRemaining(196238472)
> > 9/21/2004 11:15:13 AM: ReadMoreData: Set cbTotalToRead(491520),
> > curReadBuf(0), readOff(557056)
> > 9/21/2004 11:15:13 AM: ReadIoCompletion: Read (16384), nBufIndex (0)
> > 9/21/2004 11:15:13 AM: ReadIoCompletion: pRecv->nRead = 2719744,
> > pecb->cbTotalBytes =
> > 9/21/2004 11:15:13 AM: UploadStats::SetStatus:
> > b7d47a29-7afe-4c67-a4da-0f42a4de5128 , msg = <msg>1</msg>
> > 9/21/2004 11:15:13 AM: ReadMoreData: nRead=2719744,
> > TotalRemaining(196222088)
> > 9/21/2004 11:15:13 AM: ReadMoreData: Set cbTotalToRead(475136),
> > curReadBuf(0), readOff(573440)
> > 9/21/2004 11:15:13 AM: ReadIoCompletion: Read (0), nBufIndex (0)
> > 9/21/2004 11:15:13 AM: ReadIoCompletion: Err: HSE_REQ_ASYNC_READ_CLIENT
> > (0x3f0)
> > 9/21/2004 11:15:13 AM: UploadStats::SetStatus:
> > b7d47a29-7afe-4c67-a4da-0f42a4de5128 , msg = <msg>File Upload Error :
> > 1008</msg>
> > 9/21/2004 11:15:13 AM: CleanupRecvWorkItem: QryStr is
> >
>
formsubmit=yes&SDC_INSTANCE=INTUIT1&virtual=sdchealtop&redirect=https://data
> >
>
.intuit.com:443/sdchealtop/rrn/issue_attachment.asp?issueGuid=ca7520c5-7f15-
> >
>
45e1-aae1-a88538a0216c&issueGuid=ca7520c5-7f15-45e1-aae1-a88538a0216c&instan
> > ceGuid=b7d47a29-7afe-4c67-a4da-0f42a4de5128
> > 9/21/2004 11:15:13 AM: IsHTTPS: Using https
> > 9/21/2004 11:15:13 AM: CleanupRecvWorkItem: Recv completed, Cleaning
> > 9/21/2004 11:15:13 AM: CleanupRecvWorkItem: Closing handle cf0
> > 9/21/2004 11:47:30 AM: sprtidt DLL_PROCESS_DETACH: exiting
> >
> > "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
> > news:O1LJsEKuEHA.1132@TK2MSFTNGP12.phx.gbl...
> > > What exact Thread Pool are you disabling? Does your ISAPI Extension
> ever
> > > function correctly even if the "thread pool" is enabled, etc.
> > >
> > > ISAPI API has nothing to write to the local filesystem -- so please
> > clarify
> > > what exactly you are doing. Identity token being used and specific
API
> > > functions being called (and in what order) would be useful.
> > >
> > > --
> > > //David
> > > IIS
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > //
> > > "asit" <asitkharshikar@gmail.com> wrote in message
> > > news:uvho$IBuEHA.1400@TK2MSFTNGP11.phx.gbl...
> > > Hello Everyone,
> > >
> > > I have a isapi extension that does large file uploads and downloads
> using
> > > async ReadClient and TransmitFile api's. When running over HTTPS with
> the
> > > thread pool disabled. I see from the logs that some writes are are
> failing
> > > with the following error 0x3f0 (An attempt was made to reference a
token
> > > that does not exist.). Has anyone faced this issue ?. The extension is
> > > running medium pooled under the IWAM_<machinename> account. Also i am
> not
> > > impersonating the IIS context when the thread pool is disabled.
> > >
> > > Any comments or suggestions would be highly appreciated.
> > >
> > > Thanks in advance for your help.
> > >
> > > Regards
> > > - Asit
> > >
> > >
> > >
> >
> >
> >
> >
> >
>
>
>
>
- Next message: Scott Roberts: "RE: Can't install IIS on fresh Slipstreamed XP SP2"
- Previous message: bernadou: "Re: Newbe: Can't create site w/host name"
- Maybe in reply to: asit: "ISAPI extension fails with "An attempt was made to reference a token that does not exist" during WriteFile"
- Messages sorted by: [ date ] [ thread ]