Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Report.Publish(string, FileFormat) Exception: Cannot access the file b.c. it's being used by another process
posted

Hello,

i have a problem with the Report.Publish() method. It throws exception like this:

Exception: The process cannot access the file 'XXX.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, Boolean useLongPath, Boolean checkHost)

at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)

at System.IO.FileStream..ctor(String path, FileMode mode)

at Infragistics.Documents.Reports.Report.Report.Publish(String fileName, FileFormat format)

Does anyone know what's the problem is?

Thanks for your answers.

Greets,

Teddy