The views expressed on this weblog are mine alone and do not necessarily reflect the views of my employer.
 Tuesday, September 16, 2003
Internet Explorer and the Magic of Microsoft KB Article Q293792

Seems like a lot of my posts lately have started with something like "Here's a weird IE bug" or "Here's something odd in .NET" but...

Here's a weird IE thing.  We do a lot of Check Imaging and Statement stuff here, so if someone wants to go online and get an image of a check, they can.  We often use Web Services to talk to a Check Imaging Server.  Most often we retrieve PNG, JPEG, or GIF.  Sometimes, however, the client wants an Adobe Acrobat PDF. 

We'll make the SOAP call, get a PDF then stream it directly to the user (You don't want to save these kinds of things, for security purposes). 

Enter bug/feature Q293792.  Not a lot seems to have been written about this, and not a lot of people seem to care, but apparently when opening a full ActiveX embedding window (to host Acrobat, etc) IE makes either THREE or TWO requests for the content.  This is apparently "by design" as URLMON and MSHTML have trouble communicating.  So, MSHTML sends a request to "sniff" for the MIME type to figure out what app to load. 

Other than being a bandwidth hog, this wouldn't be a big deal - except, when the generation/retrieval of a PDF is an expensive operation involving a WS call to the back end. (Wow, a production Web Service! Madness! Heresy! ;) )

What's interesting is that IE changes the UserAgent HTTP Header to "contype" during the probe, obstensibly so we can simple return the MIME/type and not the actual data.

So, we need to handle that...something like (in classic ASP "psuedo-code"):

  If Instr(1, UserAgent, "contype") > 0 Then
   'Just send the mime/type
   Response.ContentType = "application/pdf"
  End If

So, that's not too bad.  But, even the "Fixed" versions of IE still send TWO requests.  So, we want to detect the second request and not return the whole thing again. 

Here's the other ODD point.  For reasons unknown to me, IE doesn't include the Accept-Language header when making this second call, so, we have them use what has already been sent by saying "Not-Modifed":

  Dim Language
  Language = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
  If Language = "" then
   Response.ContentType = "application/pdf"
   Response.AddHeader "Last-modified", "Mon, 01 Sep 1997 01:03:33 GMT"
   Response.Status = "304 Not Modified"
  End If

Ah, the fun of supporting older versions of IE.  I think we need an updated IE Roadmap. 

The future of browsing, dear readers, is up in the air, IMHO.

Updated Link to this post 5:05:12 PM  #    comment []  trackback []
Switching [all] Providers...

Well, my email (as well as for all my Hanselman relatives) has been down with DNS and dumb problems since Friday, so it's official.  I'm switching.  I'm switching to ORCSWeb.  I'll move all my domains there, including,, and  Expect some weird DNS and silliness over the next few days, possibly this week.  I'm a huge believer in the permalink, so if I do it right, everything will work as before. 

After the dust has settled, I'll likely move from Radio to DasBlog.

Updated Link to this post 10:21:38 AM  #    comment []  trackback []
 Friday, September 12, 2003
Linux/J2EE causes colon cancer?

Wow...good thing I'm covered! ;)

A Forrester research project, funded by Microsoft inc., has determined that developing software using a Linux/J2EE development environment increases a developer's risk of dying from colon cancer by up to 40% over the risk when developing with Microsoft's .Net technology.

Updated Link to this post 10:13:19 PM  #    comment []  trackback []
 Thursday, September 11, 2003
Rory asks, Why do I code?

Why do I code?  Because I can't cook, or change my own oil, or mow lawns.  Because I lettered in drama in High School but I never got discovered walking an L.A. mall.  Because I never made any money doing standup.  Because, God help me, if I wasn't coding the only think I'd be good at would be selling cars.  (I'm REALLY good at selling cars.  Seriously.)

For real, I code because I like solving problems that are decidedly solvable.  I mean, I hear the problem, I think for a moment, I figure it's "possible" and then I try to figure how to solve it in a way that feels good.  Because I dig physics.  Because the end of the Carl Sagan's "Contact" was UNSPEAKABLY cool.  I code because of that feeling I've gotten 5 or 6 times when I just NAILED a problem and (while alone) raised my arms high in victory the same way that rapid sports fans do.  Except I look at them with a worried disdain when they do it, but secretly I wish I felt like that more often.

I code because coding, at its best, is art and literature and math and physics all at the same time.

Updated Link to this post 5:33:35 PM  #    comment []  trackback []
Acquaintances, Buddies, Colleagues, Friends, Family, and Cousins

I'm sitting on a plane from St. Louis to Orlando on the way to VSLive/ASPLive.  I was thinking about who I'm going to see at the conference.  I figure that my buddy Chris Kinsman will be there and possibly acquaintances of mine such as Keith Pleas.  Why just acquaintance?  I've had the pleasure to email Keith four or five times and I've met him four or five times, but when I see him I still lead with, "Keith! Scott Hanselman, how are you doing?" just in case Keith doesn't remember me, and this way he doesn't have to waste CPU cycles looking my face up.  I do the same thing with other acquaintances and "colleagues" like Chris Sells and Don Box and [Insert name here], et. al..  They are colleagues as I see them a few (sometimes several times) a year on campus or at conferences.  I say hi, but don't expect them to know my wife's name, since when you're holding all the WS-*.* specs in your head, sometimes you can't remember lots of trivial social details. 

So I got to thinking about the difference between "friend" and "colleague/acquaintance."  I have some remote friends, Patrick Hynds for example, who I chat with a few times a week and who could TOTALLY crash at our place on a moments notice.  We've shared (soft) drinks many times and have stories going back years.   But, I've only seen Patrick at conferences and on campus also.  Hell, I started to realize that I see Don Box more than I see my uncles (I see them on the 4th of July and at Christmas) and Don remembers my name better than my cousins! 

Therefore, I conclude that either:

A. I'm not nearly close enough to my family and need to spend more time with them instead of at conferences


2. Patrick, Keith, Don, ClemensChris, Chris, Sam and MANY others that I see several times a year are my REAL family and will not be surprised when I show up on their door wondering if I can sleep on their couch.

 Anyone else have this problem, or just me?

Updated Link to this post 5:19:43 PM  #    comment []  trackback []
 Wednesday, September 10, 2003
It came in the mail today...

It came in the mail today, and it's about time.  What's next?

Updated Link to this post 8:49:42 PM  #    comment []  trackback []
The tragedy of November 9th

So, two people commented (one email, one blog comment) with some confusion over the 11/9.  Here's the explanation:

It was an internationalization joke (and a good one I thought) When we say 9/11 (formatted mmddyy) most people in the STATES assume we mean September 11.  In the last two years the word 'nineeleven' means more than just a date.  But it's use and newly attached deep meaning underscores how alone we are as a nation (not just politically) in things like date formatting and the measuring systems.   The rest of the planet uses ddmmyy, so they would say "11/9". 

The joke is, when we say "oh, ya, 9/11 was a horrible day," a non-american might say, "November 9th? What happened?"  Of course, nothing happened on 11/9, we just assume that 9/11 or 4/3 or 8/12 means the same thing to us as it does to them...

P.S. There was a local news report a while back that the local news had pulled off the AP NewsWire.  Some fellow came in on a Tourist Visa and transferred to a Student Visa.  At some point, he was arrested for some thing or the other and the local news lady, thinking this fellow had gotten away with some clever chicanery commented slyly that his identity was called into question when the news station "discovered" that his drivers license said he was born on 4/3 but his birth certificate listed his DOB as 3/4.  Oh, those wacky terrorists trying to pull one over on us.  If I had a nickel for every time an international friend reversed a date on a form...

Updated Link to this post 4:16:24 PM  #    comment []  trackback []
ASPLive! and flying on 9/11

Tomorrow, I'm leaving for Orlando to speak at ASPLive on Internationalization.  I'll be flying exactly two years (to the minute) from September 11.  Needless to say, the wife's justifiably not happy about it and I have mixed feelings. 

My boss says that even flying on September 11th is safer than driving any day.  I'm not sure about that, but I'll definitely be expecting some extra security.  It's always a challenge to get my Insulin Pump through.

If you're in Orlando at VSLive, please do stop by my Friday afternoon session called "It's the WORLDWIDE Web."  I'll be showing some cool stuff in ASP.NET like a banking site in English, Chinese, Malay, Spanish and Arabic.  We'll talk all about System.Globalization and dig into the issues around Dates, Currency, Culture and Right to Left languages.  It's a very interesting topic.  I may try to greet the crowd in at least 10 languages. :)

Remember, when we talk about what happened on 9/11, most people in the world wonder what happened on November 9th...

Updated Link to this post 2:30:30 PM  #    comment []  trackback []
Things that make my life better...thanks for sharing

Well, that was a nice little spike of traffic.  A few random thoughts:

  • Thanks to everyone for comments and author corrections for the tools on my List o' Tools. 
  • Too bad Radio doesn't appear to support Trackback/Pingback from 'Stories' or I'd know who's linking to me. 
  • I'll continue to update the tools list as I add more.  I'll also try to categorize it one day. 
  • Note that I only keep favorite tools - no cruft, no crap.  This isn't a list of "all tools" or "favorite tools" but rather "things that make my life better"
  • Some folks commented that it was mostly Windows and .NET stuff.  True, true.  That's where I live now, but some tools/utils I didn't include were Grep for Windows and Cygwin and Visual Studio Power Toys, etc, as I didn't think they qualified as simple little utils, although maybe they do.
  • I didn't include a utilities that are internal (either Corillian-internal or Microsoft-internal) although I wish I could.  There's some amazing stuff out there.
  • Now only if my list could get Scobleized by Robert's 18 readers...
  • As I sit here and look at my Start Menu, that fills my 1600x1200 screen and runs off the right edge, I see at least 40 other great utils that AREN'T in C:/UTILS that I missed.  I'll add them one day.

Updated Link to this post 11:49:06 AM  #    comment []  trackback []
 Tuesday, September 09, 2003
Scott Hanselman's Ultimate Developer and Power Users Tools List v1
Roy Osherove suggested that I post a list of the contents of my C:/UTILS folder.  Everyone collects utilities, and most folks have a list of a few that they feel are indispensable.  Here's mine.  Each has a distinct purpose, and I probably touch each at least a few times a week.  For me, util means utilitarian and it means don't clutter my tray.  If it saves me time, and seamlessly integrates with my life, it's the bomb.

Here are most of the contents of my C:/UTILS folder. These are all well loved and used.  I wouldn't recommend them if I didn't use them constantly. Perhaps Roy didn't realize what he was asking for.

One day I'll categorize them (if someone cares) but until the, here's "Scott Hanselman's Ultimate Developer and Power Users Tools List" for your approval.

Updated Link to this post 2:51:03 PM  #    comment []  trackback []
 Monday, September 08, 2003
iPods are God's Gift

Oh yes, the iPod is the shiznit.  I had a Rio 500 for a number of years with 128 megs of ram and got my iPod about 6 months ago. 

I do recommend, however, immediately jettisoning the crap MusicMatch software and using these tools:

  • EphPod for the quick and dirty work: Add a song, edit IP3 tags, adding Outlook Calendar appointments, vCard Contacts, text files, etc.
  • MoodLogic and DeviceLink are the best thing to happen to MP3s since Napster.  Of course, I don't share music anymore, but I do rip the hell out of my 500+ CD collection.  MoodLogic is worth the money just for it's song identification capabilities.  It fixed the file names on at LEAST 1000 of my songs, including what # it is on the CD, who the artist is, etc.  Plus, it creates "Mood Mixes" in the iPod automatically.  Coincidentally, the core of it's iPod compatibility is...EphPod.
  • Then, just for kicks, use Muse.NET to listen to your 20 gigs of music, legally, from work with .NET and Web Services.  There are lots of sample applications (many in .NET) to exploit their API, and exploit the programmaticalshipfulness of your music.

Now, if I had only waited, I could have had a 20 gig iPod for the same price...

Updated Link to this post 5:55:43 PM  #    comment []  trackback []
The Microsoft Roadmap Decoded

Just when I'm asked to start thinking about Technology Roadmaps, I find this great dissection of the Microsoft Technology Roadmap.  Some highlights:

Disappearing Code Names (Gone, But Not Forgotten)

Product Name/ "Code Name" Additional Info. Projected Ship Date
"Shorthorn" (33) Stopgap release of Windows client 2003
.Net My Services/ "Hailstorm" MS thought to be building many of these into future Windows editions 2004
"BizOffice" combo BizTalk-Office application for B2B 2003 (?)

Updated Link to this post 4:53:21 PM  #    comment []  trackback []
It's happy utility day!

Finally got around to installing my new shiny version of SoapScope, the little sniffer that could.  I showed an early beta at TechEd 2003 in Dallas, but now it's released!  It's wicked cheap, and when you're doing Web Services development in a workgroup situation, especially when the interface is in flux and the folks on the other side are in another time zone, it's slick. 

It stores all the traffic in a built-in database and others can view and debug the service as it moves through time using a web interface served by it's internal (Apache) web server.  It sniffs traffic via a packet capture OR as a proxy.

Two new features that I'm really digging are the WSDL Analyzer that checks for validity and compilance, and the Diff-er, that gives a sweet view of what's been changing from call to call, version to version.

Updated Link to this post 3:52:56 PM  #    comment []  trackback []

My buddy Jonas Blunck, hero of the people and maker of ComTrace and IEHttpHeaders has done it again (along with Kim Gräsman) with DeveloperPlayground.  At first it looks like Process Explorer from SysInternals, but it includes such cleverness as:

  • Shows run-time DLL dependencies for running processes
  • Hooks any process, and tracing single calls to external DLLs
  • Integrates with favorite tools such as Google, OleView, Depends and the Explorer
  • DeveloperPlayground now lives happily in the hallowed halls of my C:/UTILS folder with the best of them.  Great job guys, keep it up!  I think be using and suggesting this util in my C# Class this fall.

    Updated Link to this post 3:04:29 PM  #    comment []  trackback []
    Technical Debt

    A nice clean way to describe the ramifications of the decisions we have to make every day.  Also, a way to describe to our bosses (in term$ they understand) why doing something quick-and-dirty may bite us in the ass.

    "Technical Debt is a wonderful metaphor developed by Ward Cunningham to help us think about this problem. In this metaphor, doing things the quick and dirty way sets us up with a technical debt, which is similar to a financial debt. Like a financial debt, the technical debt incurs interest payments, which come in the form of the extra effort that we have to do in future development because of the quick and dirty design choice. We can choose to continue paying the interest, or we can pay down the principal by refactoring the quick and dirty design into the better design. Although it costs to pay down the principal, we gain by reduced interest payments in the future" [Martin's Bliki]

    Updated Link to this post 2:15:11 PM  #    comment []  trackback []
     Saturday, September 06, 2003
    The Zen of .NET: Vacation Continues

    Still on's my first one in I don't know how long and I am ALL kinds of jet-lagged.  I just don't know what time it is.  When we went to Zimbabwe (+10 hours) I had no jet-lag, but Malaysia (+15) is messing me up.

    Anyway, turns out that the Zen of .NET presentation at TechEd Malaysia did all right.  Apparently there was a short write-up in the Malaysian newspaper "The Star" on The Zen of .NET.  I don't remember saying some of the quotes, but it's still nice to see that the talk resonated with folks.

    Back to work, and too blogging on Monday.  I've got a particularly interesting Web Services and WSE 2.0 multi-protocol problem I've got to share.

    Updated Link to this post 4:22:17 PM  #    comment []  trackback []