Here's the function i made :

```
if (Valide())
{
    try
    {
        File.Delete(Server.MapPath("F16client.pdf"));
    }
    catch
    {
    }

    using (FileStream ms = new FileStream(Server.MapPath("F16client.pdf"), FileMode.Create, FileAccess.Write, FileShare.None))
    {
        PdfReader lecteur = new PdfReader(Server.MapPath("~/Formulaires/f16.pdf"));

        PdfStamper etampeur = new PdfStamper(lecteur, ms);

        // DO STUFF, Whatever

        etampeur.FormFlattening = true;
        etampeur.Close();
        lecteur.Close();

        System.Net.Mail.Attachment at = new Attachment(Server.MapPath("F16client.pdf"));                                            
    }
}

```

It work when testing local, but on IIS, this W3W process won't let go of my f16client.pdf and i always end up with :

> 
> The process cannot access the file 'D:\inetpub\wwwroot\Formulaire16\F16client.pdf' because it is being used by another process.
> 
> 
> 

Why is that file still in use when on IIS and not when testing local ??????