I am creating about 100 PDF's and after about 16 are generated I get the following error:
System.IO.IOException: The process cannot access the file 'FileName.pdf' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at ceTe.DynamicPDF.Document.Draw(String filePath)
I have tried recreate the issue with the HelloWorld Console PDF on the server and modified it to generate 100 PDFs and it worked fine.
Any idea what I can do to eleminate this?