Here is some part of my code..

```
if (fileInfo.Exists) {

    HttpContext.Current.Response.Clear();
    HttpContext.Current.Response.Buffer = true;
    HttpContext.Current.Response.ContentType = contentType;
    HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + hdnFileName.Value + "." + extension);

    try {
        HttpContext.Current.Response.WriteFile(hdnReportPath.Value);
        Response.Flush();
        HttpContext.Current.ApplicationInstance.CompleteRequest();
    } catch (Exception ex) {
        AppException appEx = AppException.Handle(ex, string.Format("Agency:{0} User:{1}", agencyID, userId));
    } finally {

    }

}

if (fileInfo.Exists)    
    File.Delete(hdnReportPath.Value);

```

It does not produce any exception or error, but it is not working in server(IIS), It works good in local. What are the reasons for not deleting the pdf file in server? 
Thanks in advance....