I am facing the problem of Pdf-accessing actually i m sending PDF file with attachment after saving this file to that server using below code:
System.Net.Mail.Attachment a = new System.Net.Mail.Attachment(Server.MapPath("PDFChangeGrid.pdf"));
and i m saving file using this code below:
it is working fine
this all functioning is happenning on the button click event
as i sent mail first time on button click then mail has sent fine but If again i sent it then problem occurs
"The Process of accessing the file is denied becoz this file is using by another process "
I have tried out to delete that file after sent that pdf and also destroy that attachment variable but this problem occurs on that position because to delete that file first we have to access it so problem consist that time as well.
please tell me right solution for that