file not downloaded in webmethod
<p>I am using webmethod to download a .zip file but file is not download. my code run well  without error, code is below:
 <br></p>

<pre><code> [WebMethod]
    public static void DownloadExtension(string ExtensionPath)
    {
        string filepath = HttpContext.Current.Server.MapPath(ExtensionPath);
        FileInfo file = new FileInfo(filepath);
        if (file.Exists)
        {
            HttpContext.Current.Response.ClearContent();
            HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
            HttpContext.Current.Response.AddHeader("Content-Length", file.Length.ToString());
            HttpContext.Current.Response.ContentType = ReturnExtension(file.Extension.ToLower());
            HttpContext.Current.Response.TransmitFile(file.FullName);
            HttpContext.Current.Response.End();
        }
    }

    private static string ReturnExtension(string fileExtension)
    {
        switch (fileExtension)
        {            
            case ".zip":
                return "application/zip";  
            default:
                return "application/octet-stream";
        }
    }
</code></pre>

<p><br>
i am using <strong>VS2008</strong> any solution thank you.</p>
