You should try like in the next example:
try
{
Response.Clear();
Response.ClearContent();
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=" + this.FileName);
Response.Cache.SetCacheability(System.Web.HttpCacheability.Public);
string filePath = string.Format("{0}\\{1}", Server.MapPath(this.VirtualPath), this.FileName));
if (System.IO.File.Exists(filePath))
{
Response.TransmitFile(filePath);
}
else
{
Response.Write("File Not Found!");
}
Response.End();
}
catch (Exception ex)
{
}
An in your Web.config you should have the next setting that will make accessible the "PDF folder" named "Content" to all users:
<location path="Content">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>