Why can't iPad download mp3 files?
<p>I have E-Commerce website and uploaded some mp3 files in it, and customers can download the mp3 files to a PC, but when they try to download them to an iPad, iPad can't download them.</p>

<p>The code for downloading files is the following</p>

<pre><code>public static void DownloadAudio(string url)
{
    if (HttpContext.Current.CurrentHandler is basePage)
    {

        HttpContext.Current.Response.Clear();
        string fileDiskPath = HttpContext.Current.Server.MapPath(url);
        FileInfo fileInfo = new FileInfo(fileDiskPath);

        HttpContext.Current.Response.ContentType = "audio/mp3";
        HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}", fileInfo.Name));
        HttpContext.Current.Response.AddHeader("Content-Length", fileInfo.Length.ToString());
        HttpContext.Current.Response.WriteFile(fileDiskPath);
        //HttpContext.Current.Response.Flush();
        HttpContext.Current.Response.End();

    }
    else
    {
        throw new NotSupportedException("Note: This method is not supporting user controls.  Consider supporting user controls by getting the parent page from user control.");
    }
}
</code></pre>
