Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Jeff Makes Software

The software musings of Jeff Putz

  • HttpHandlers and big files

    I use an HttpHandler on my podcast site to catch the requests for MP3's and increment a download counter. This seems to work pretty well, and I haven't had any problems to date. It also helps force the "save as" dialog so people aren't viewing them in their browsers.

    However, when I try to apply the same concept to big video files, it chokes. iTunes says the network connection is reset while Firefox simply says the document contains no data.

    What might be going on here? The code is what you've likely seen in countless examples elsewhere, like this:

    public class MovHandler : IHttpHandler
    {
        public MovHandler()
        {
        }
       
        public bool IsReusable
        {
            get { return true; }
        }

        public void ProcessRequest(HttpContext context)
        {
            context.Response.Clear();
            context.Response.ContentType = "video/quicktime";
            string path = context.Server.MapPath(context.Request.FilePath);
            NewsItem item = new NewsItem(Path.GetFileName(context.Request.FilePath));
            item.Downloads++;
            item.Update();
            context.Response.WriteFile(path);
            context.Response.End();
        }
    }

  • Visual Studio 2005 on Amazon

    I noticed today that Visual Studio 2005 is now listed on Amazon. The pro version lists for $809 with a release date of November 28. The Team System MSDN skus are also up there for $4,929.99, same release date.

  • Apple is pissing me off

    For all of the love I generally give Apple, they're really annoying me right now. iTunes v5 and v6 won't burn CD's for me. Nothing else has changed on my system, so it's not my problem. Everything was peachy with v4.9, and has since gone down the tubes.

    What's particularly annoying is that there are widespread cases of the same error on their forums, and it has been well over a month now since they broke something. People with purchased music are getting blown off, which is pretty lame. Replacing my perfectly functional drive is not a solution!

  • MSSEARCH is the devil!

    Despite defragging my server's hard drives, I was still getting crazy disk gnashing and it was bringing everything to a crawl. I finally fired up the SQL Profiler and I was astounded to see crazy hits to one of my fulltext indexes over and over. It appeared that the incremental population of one of the indexes was "stuck" on something and just couldn't recover.

    I prototyped a self-standing search engine for POP Forums v8 a few months ago, and it performs a lot better and with better results. I'm still working on cleaning up the word indexing (junk words I've got, but I need to get the punctuation and HTML out), but it works. I even ran some tests against a large (800mb) forum and it seems to work really well.

    I need to get back on the horse and ramp that stuff up again!

  • Visa/Mastercard settlement: I get $19!

    I've complained before that Visa and Mastercard screw you with fees. Well, apparently they're settling an antitrust suit.

    I got a settlement notice in the mail indicating I'm entitled to $19! Whoo hoo! I can finally buy that Porche!