Scott Hanselman

Missing Operating System - Learn from me, backup your hard drives THIS YEAR!

December 8, '04 Comments [17] Posted in Musings
Sponsored By

BignewlaptopGasp. I returned from lunch only to find my computer in the middle of a blue screen.

Let me tell you folks, this is the computerguy-equivalent of finding your wife in bed with your brother. All the same emotions run through your mind (I would imagine):

  • Oh, you dirty bitch.
  • How could you do this to me?
  • And now, during the holidays!?

I rebooted, and was welcomed by and immediately disconcerting clank and the ominous evil that followed:

Missing Operating System

Seriously people, drink that in. Really, wallow in the pitiful blackness that is the failed BIOS POST, accompanied by the omnipresent but almost subconcious whispering "f*ck you...f*ck you..." clack of what remained of your drive heads.

Here's the catch. I backed it all up (for the first time in months) THE DAY BEFORE. I backed it all up (the data) to my Iomega REV Drive.

I'm digging this drive more and more.  Some poo-poo'ed the purchase, saying it was too expensive, and instead opting for other mini-harddrives (USB or Firewire) to copy their data to. I prefer a removable solution, one that I can put in a safety deposit box or fire safe.

Anyway, I'm about 40% done installing my programs as you can see by my Start Menu.  I'll know I'm done when the Start Menu completely fills my 1400x1050 screen.

Back up people. Do it today. Do it now.

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 twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Where are User Tasks from the Task List in Visual Studio.NET Stored?

December 6, '04 Comments [3] Posted in Programming
Sponsored By

I'm not sure why I wanted to know this, but I was looking for where the User Tasks (not the auto-generated Comment Token Tasks) were stored from Visual Studio.NET.

They are stored in the Solution file's (.SLNs) parallel Solution User Options (.SUO) file. This file appears to be OLE Structured Storage, even in Whidbey.

Now I know.

P.S. We, as a policy, don't check either *.SUO files or *.CSPROJ.USER files into source control (we've added them to .CSVIgnore) as they are totally user-specific options and would not only clutter and confused, but potentially share settings and tasks we don't want to share.

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 twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Precompile.axd in ASP.NET 1.1 with System.Web.Handlers.BatchHandler: A harbinger of ASP.NET 2.0 left vestigially in 1.1?

December 5, '04 Comments [0] Posted in ASP.NET | HttpHandler
Sponsored By

I'm surprised I'm just now noticing this. Jon Galloway hooked up the apparently unused System.Web.Handler.BatchHandler to an httpHandler and was able to precompile all his .ASPX pages. This could be useful during deployment to catch any goofs in ASPX code. Certainly not something you want on in production lest you be DoS'ed with compilation, but a helpful thing regardless.

To set this up at the machine level, add the following line to the <httpHandlers> section of %windir%\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config:

<add verb="*" path="precompile.axd" type="System.Web.Handlers.BatchHandler"/>

To set this up at the application level, add the you'll need to create an httpHandlers section like so: [JonGalloway]

<configuration>
  <system.web>
    <httpHandlers>
      <add verb="*" path="precompile.axd" type="System.Web.Handlers.BatchHandler"/>
    </httpHandlers>
  </system.web>
</configuration>

Now playing: Stevie Wonder - As

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 twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Target: Referral Spam in dasBlog

December 4, '04 Comments [1] Posted in ASP.NET | DasBlog | XML
Sponsored By

I've pretty much solved the comment-Spam problem (only one person has voiced their distaste so far) but a recently perusal of my logs and older posts indicated a ridiculous amount of referral spam. 

This is when someone hits a post on your site and has changed/hacked the HTTP Referrer Header to indicate where they came from. If your blog adds this referrer to the page, as most to, you've just linked to Hot Gay Sex (not that there's anything wrong with Hot Sex between consenting adults : ) ) or whatever by their actions.

The story goes when Google comes around, they see that you've linked to them, and they get Google Juice via the Page Rank System.

Not only is this potentially offensive to my readers, it also obscures the posts and comments when they are filled with referrals.

Potential Solutions:

  • Stop printing out referrals on my pages.
    • Personally, I like to see them, and I think they provide value to the reader so they can see other places with information of interest. It also promotes cross-linking between my peer blogs.
  • Modify dasBlog to NOT add icky referrals.
    • This would be idea. However, it will likely be in version 1.7 in some way, either via James Snape's whitelist solution (I think a whitelist removes the point of referrals, and I'll greatly prefer a keyword-based black list) or some other technique.
    • I've avoided running a "private build" of dasBlog so far (as evidenced by my care in creating the CAPTCHA solution without recompiling) and I'd to continue as such
  • Clean the .xml files occasionally with a process
    • This is quick, easy, can be automated, and will work in the short term for me as I await dasBlog 1.7.

So, here was an opportunity to use the only dev stuff I have on my home machine, Visual Studio C# 2005 Express

Here's what I did. Use at your own risk, back up your /content directory, and know that this will only have to run on your "*.dayextra.xml" files from dasBlog. No error handling, no warrenty, but it worked for me. Enjoy.

Usage: TrackingFilter "c:\yourdasblogcontentdirectory"

File Attachment: TrackingFilter.zip (9 KB) (for VS.NET 2005, I don't know if it works in 2003)

WARNING: The words I put in the .config file are ; delimited and are unquestionably offensive. Not only do they include most of George Carlin's words but they also include "bloglines" and "artima" because they don't provide a value in my referral list.

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 twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

GUI Front End to Chris Sells' XmlPreCompiler - For Debugging XmlSerialization Errors

December 3, '04 Comments [0] Posted in ASP.NET | XmlSerializer | Bugs | Tools
Sponsored By

I spend a lot of time with the XmlSerializer (I personally dig it immensely, and I think too many people complain about it, but anyway) and while I put up an article on how to debug directly into the generated assemblies, I noticed that Mathew Nolton has a GUI Front-End to Chris's XmlSerializerPreCompiler.

The tool will check to see if a type can be serialized by the XmlSerializer and shows any compiler errors that happen behind the scenes. +1 for Useful, thanks Chris and Mathew.

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 twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

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