Scott Hanselman

Moving from Radio to DasBlog, DNS, Redirects, Permalinks and Radio "Stories"...

September 18, 2003 Comment on this post [2] Posted in Web Services | DasBlog | Javascript | XML | Tools
Sponsored By

I gotta say, I'm really impressed with DasBlog.  Particularly the upgrade/moveover from Radio Userland.  It's really nice.  It's been a crazy week:

  • My email at hanselman.com was down since I left for ASPLive!  I wasn't even aware until I got back.  This includes all my relatives mail (really, who among us ISN'T the IT director for the entire family?)
  • I switched all my domains over to ORCSWeb.com.  Damn they are cool.  Their support is totally TOP NOTCH. 

At Stephen Forte's (and others) urging, I moved from Radio to DasBlog (no doubt there will be some cleanup and misc goo, but still).  It will be nice to be able to post from anywhere - not just my laptop!

  • I moved all my Radio articles into DasBlog with the importer tool...very slick.  Dump the resulting XML into the Content folder and you're in.
  • I added (thanks Clemens!) this META tag to Radio and re-rendered all the pages on my site for the last year.  This will redirect all visitors to the new site.  There is also some associated javascript that will bring their original referrer (Google, etc) along for the ride.
    • <meta http-equiv="REFRESH" content="2; URL=http://www.hanselman.com/blog/fromradio.ashx?external_referrer=&url=<%radio.weblog.getUrl()+path%>">
  • I imported my blogroll from NewsGator.  Had a little trouble with case-sensitivity re: xmlurl and xmlUrl.  Some manual editing did the trick; no need for XSLT (yet).
  • I modified the blogrolling display code to trim long titles and append "..."
  • DasBlog doesn't handle the concept of "Stories" from Radio, which are basically really long posts that get their own non-dated link.  Clemens suggested that I come up with a plan and add it to the GotDotNet workspace for DasBlog, but I don't have the time this instant.  Instead, I did this clever thing:
    • Added this URL rewrite info to the web.config:
      <add matchExpression="(?&lt;basedir&gt;.*?)/fromradio\.ashx\?external_referrer=(?&lt;ext&gt;.*)&amp;url=http\://radio\.weblogs\.com/0106747/stories/(?&lt;year&gt;\d+)/(?&lt;month&gt;\d+)/(?&lt;day&gt;\d+)/(?&lt;page&gt;.*)" mapTo="{basedir}/default_nocache.aspx?external_referrer={ext}&amp;test={page}" />
    • I couldn't find the xml versions of the stories (anyone?)...so I copied the rendered stories tree from Radio into blog/content/radioStories/.  Basically, if someone visits a story on my current Radio site, they'll be redirected to the same rendered (static) story inside DasBlog.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

The Utilities Continue...

September 18, 2003 Comment on this post [0] Posted in Web Services | ASP.NET
Sponsored By

The response to the Ultimate .NET Utils list has been overwhelming...over 10,000 hits over the last week!  Now DotNetBoy weighs in with his own list of utilities.  A lot of great stuff here, including several nice command line utils I haven't seen like:

  • AFind - command line util for listing files based on Last Accessed Time
  • Nupp.exe - a "Stack" for mapping drives (Push/Pop)
  • Sanur.exe - lets you pipe the password into RunAs, making RunAs scriptable

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Internet Explorer and the Magic of Microsoft KB Article Q293792

September 16, 2003 Comment on this post [1] Posted in Web Services | PowerShell | Bugs
Sponsored By

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"
   Response.End
  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.Clear
   Response.ContentType = "application/pdf"
   Response.AddHeader "Last-modified", "Mon, 01 Sep 1997 01:03:33 GMT"
   Response.Status = "304 Not Modified"
   Response.End
  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.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Switching [all] Providers...

September 16, 2003 Comment on this post [2] Posted in DasBlog | Diabetes
Sponsored By

Well, my Hanselman.com 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 www.hanselman.com, www.diabeticbooks.com, www.glucopilot.com and www.computerzen.com.  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.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Linux/J2EE causes colon cancer?

September 13, 2003 Comment on this post [0] Posted in Musings
Sponsored By

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.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.