LOCK problem of file recorded by Pdfwriter

Asked

Viewed 27 times

-1

I am writing a file to the server (ASP.NET) which is a PDF and for this I am using Itextsharp. Everything is working correctly my problem is that when I try to generate the second PDF it gives me error message saying that the file is in use by another process.

I’ve used all the resources I know to release the file but without result.

Does anyone have any suggestions...???

Follow the code excerpt.. inserir a descrição da imagem aqui

I appreciate the help. Eduardo

  • Edit your question and put the properly formatted code.

  • doc.Close() is enough to close the file. It is definitely not Mandar_Email() or something else that’s not locking?

1 answer

0


Thanks for the tip... you got the problem right. It was the routine of Mandar_email that attached the file to send it and it ended up being open for it. I put a mail.Attachments.Dispose() and solved the problem.

Thank you. Hugs.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.