British Inside

An Englishman living in small town America

James Shaw

News

  • Copyright James Shaw 2004-2007

    Creative Commons License

    View James Shaw's profile on LinkedIn

/n software components

Recently I worked on a friend's website who wanted to sell downloadable zip files - with a twist. The zips are all different; configured in realtime depending on the options chosen. So I needed a component that would be able to stream a custom zip file to the user without storing on disk.

/n software's IP*Works! Zip worked perfectly - here in a nutshell...

protected void Page_Load(object sender, EventArgs e)
{
   Response.AddHeader("Content-Disposition", string.Format("attachment; filename=myproducts.zip", orderNumber));
   Response.AddHeader("Content-transfer-encoding", "binary");
   Response.ContentType = "application/zip";

   Zip z = new Zip();
   z.ArchiveFile = string.Empty;
   z.EnableStreaming = true;
   z.OnProgress += new Zip.OnProgressHandler(z_OnProgress);
   z.IncludeFiles(sb.ToString());  // sb contains file1|file2|file3 etc
   z.z.Compress();

   Response.Flush();
}

void z_OnProgress(object sender, ZipProgressEventArgs e)
{
   Response.BinaryWrite(e.DataB);
}

As you can see, it's very easy to use.

Similarly I used their IBiz E-Payment Integrator (formerly IP*Works CC ICharge).to interface with the credit card processor LinkPoint. Again, very easy to setup and works great. I've tried talking to LinkPoint from Classic ASP and it was no fun at all. They also have the advantage that should my friend change his CC processor no code changes will be required.

It's good to finally use them; /n software were one of the first advertisers on www.CoverYourASP.com back when that was kicking. Eric M and the other good guys there have been around forever and have a huge line of components now.


Posted: Thursday, December 14, 2006 7:08 AM by James
Filed under: ,

Comments

No Comments

New Comments to this post are disabled