title: HttpHandler Path Issue ASP.NET
body: <p>I've written an HttpHandler that works fine when I test it on the ASP.NET development server.</p>
  
  <p>In my Web.Config I have:</p>
  
  <pre><code>&lt;add verb="*" path="Files.zip" type="MyNamespace.Zip, App_Code" /&gt;
  </code></pre>
  
  <p>And in my Handler in my App_Code folder I have the code below.  Unfortunately, since the ASP.NET development server dumps everthing in the root -- <a href="http://localhost:1234/Files.zip" rel="nofollow noreferrer">http://localhost:1234/Files.zip</a> works just fine.  However, I'm trying to deploy to an intranet server where the the URL is something like <a href="http://myProjects/project" rel="nofollow noreferrer">http://myProjects/project</a>.  When I point my browser to <a href="http://myProjects/project/Files.zip" rel="nofollow noreferrer">http://myProjects/project/Files.zip</a> I get a 404.  How can I tweak the web config to get the right path?  Or is the solution somewhere else?  I've already tried prefixing the path with "~/" and "./".</p>
  
  <pre><code>(Namespace MyNamespace, file Zip.cs)
  public void ProcessRequest(HttpContext context)
  {
      context.Response.ContentType = "application/octet-stream";
      DirectoryInfo di = new DirectoryInfo(context.Server.MapPath("files"));
      FileInfo[] fileinf = di.GetFiles();
      ZipFile zip = new ZipFile();
      foreach(FileInfo fi in fileinf)
      {
          zip.AddFile(fi.FullName, "");
      }
      zip.Save(context.Response.OutputStream);
  }
  </code></pre>