WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WinInet
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Error 307 File Access Failed

 Keywords: Error 307 File Access Failed iContentFile Binary Buffer BinaryAlloc BinaryFree Resource Memory ERROR_NO_SYSTEM_RESOURCES 1450 ReadFile

Question:

I seem to be having a very strange issue when trying to do an iContentFile for a file to post to a site. Does this function have a limit? The error 307 I am getting seems very strange to me. Am I just missing something? This code has worked for YEARS with no issue. Please find included a snippet of the debugged code
fs=FileSize("o:\employees\work\singlefile.xml")
(194329) VALUE INT => 73637304

bbsize=fs+2000000
(194339) VALUE INT => 75637304

bb=BinaryAlloc(bbsize)
(194349) VALUE BINBUF => 987659

BinaryEODSet(bb,bbsize)
(194359) VALUE INT => 0

bbaddr=IntControl(42,bb,0,0,0)
(194359) VALUE STRING => "738525216"

endofcontent=0
(194359) VALUE INT => 0

endofcontent = iContentFile(bbaddr, endofcontent, "fileName", "o:\employees\work\singlefile.xml", "text/plain")
(236580) VALUE INT => 0

TERMINAL EXTENDER ERROR=>307 (307: File Access Failed)

;;;END OF JOB;;;

---------- Begin structure stack dump ----------
  1 for                88 For countrt = 1 to numruntimes   reconees.wbt
  2 if                 96 If StartTime > startruntime &... reconees.wbt
  3 for               298 For count = 1 to countfile       reconees.wbt
  4 else              312 If bb == 2                       reconees.wbt
-------- End structure stack dump --------

---------- Begin WWWBATCH.INI dump ----------
[WWINT44I]
LastError=1450 (iContentFile(ReadFile))

----------- End WWWBATCH.INI dump -----------

Answer:

The last error indicates 1450 (iContentFile(ReadFile)). It is failing while it is attempting to read the file with the Windows System error ERROR_NO_SYSTEM_RESOURCES Insufficient system resources exist to complete the requested service. Make sure your code is freeing the binary buffer allocated with BinaryAlloc, using the BinaryFree function. If your code is missing that BinaryFree you could be creating a memory leak over time that causes this issue. If it is missing be sure to add the BinaryFree then reboot the system to restore the memory. Test again.

User Reply:

Well, that did the trick. I have rebooted and I am now doing the BinaryFree and everything is back to normal. Thanks for the help.
Article ID:   W17613
Filename:   Error 307 File Access Failed.txt
File Created: 2013:07:17:07:56:46
Last Updated: 2013:07:17:07:56:46