Scott Hanselman

Programmatically determine what version of ASP.NET you're running

October 15, '04 Comments [1] Posted in ASP.NET
Sponsored By

Here's a goodness from Doug Seven and various KBs. Thanks! 

<html><body><h1><asp:Label ID="Output" RunAt="server" /></h1></body></html>

<script language="C#" runat="server">
void Page_Load (Object sender, EventArgs e) {

//Microsoft .NET Framework 1.0 (no service pack) 1.0.3705.000
//Microsoft .NET Framework 1.0 Service Pack 1 (SP1) 1.0.3705.209
//Microsoft .NET Framework 1.0 Service Pack 2 (SP2) 1.0.3705.288
//Microsoft .NET Framework 1.0 Service Pack 3 (SP3) 1.0.3705.6018

string servicePack = "";
if(Environment.Version.Build==3705)
{
  switch(Environment.Version.Revision)
  {
  case 209:
  servicePack = "SP1";
  break;
  case 288:
  servicePack = "SP1";
  break;
  case 6018:
  servicePack = "SP1";
  break;
  }
}
else if(Environment.Version.Build==4322)
{
  using(
  Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\NETFramework Setup\NDP\v1.1.4322"))
  {
    if(regKey.GetValue("SP").ToString() =="1")
       servicePack = "SP1";
  }
}

//HKEY_LOCAL_MACHINE\Software\Microsoft\NET FrameworkSetup\NDP\v1.1.4322
Output.Text = String.Format ("This page uses ASP.NET {0}.{1} {2}", Environment.Version.Major, Environment.Version.Minor, servicePack);
}
</script>

Now playing: Alicia Keys - If I Was Your Woman/Walk On By

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

Indexing FireFox Browser History with Google Desktop

October 15, '04 Comments [0] Posted in Musings
Sponsored By

A few folks have complained that Google Desktop won't index the browser history of FireFox.  Google Desktop by groks IE history automatically. 

However, Chris Brooks, my boss, turned me on to to Slogger, a FireFox extension that automatically saves all your visited pages to a separate folder. 

This is then indexed by Google Desktop.  Yum.  It's got some great options as well.  Let's see how long it will take to fill up my hard drive.

Now playing: Alicia Keys - Karma

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

Sending in a Windows Crash Analysis (Error Reporting) actually paid off once

October 15, '04 Comments [2] Posted in Musings
Sponsored By

Well, that's a heck of a thing and the FIRST TIME it's ever happened to me.  I always thought I was just being a trooper to send in all my blue screens.  However, they solved one of them.  It was a bad IBM Wireless Driver. 

Note my highly descriptive comments as well.  I'm sure they helped the analysts. :)

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

Google Desktop Search and My TabletPC Web Search Power Toy - A match made in heaven?

October 15, '04 Comments [1] Posted in Programming | Tools
Sponsored By

I just realized that my TabletPC Web Search Power Toy is even MORE useful when combined with Google Desktop Search

Now I can search my entire Harddrive with Ink! Slick.

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

Google Desktop Search - I knew they'd get it right

October 14, '04 Comments [14] Posted in Musings
Sponsored By

It's freaking brilliant.  Everyone will blog about it, and will tell you this and that.  So, instead of filling your RSS Reader with the same nonsense, I'll just offer my first impressions about what I found so clever.

  • It sets a Cookie (appears to do it in FireFox as well) that makes DESKTOP appear as a choice when you visit Google.com. 
  • The link to desktop is like: http://127.0.0.1:4664/&s=1444031046.  Notice that it's running a local Web Server on my box at port 4664.  Clever.
  • In installs a few things to C:\program files\google\Google Desktop Search including:
    • GoogleDesktopOffice.dll - To index .DOC, .XLS, etc.
    • GoogleDesktopIE.dll - To index visited sites form your IE cache.  I don't see FireFox being indexed, but it's clear they are using a plugin arch and I suspect we'll see other plugins coming.
  • As most "alpha/beta" Google stuff, it's very polished.  They've really raised the bar on what it means to pre-release software.
  • They've installed an Outlook AddIn, no doubt to get to bypass MAPI and go straight to the Outlook Object Model.  They also appear to directly index Outlook Express files on disk.
  • Your desktop results are INCLUDE with standard Google results.  They appear at the top of the page: "306 results stored on your computer."  It gets an image from your local Google Web Server which is interesting:
       GET /onebox.gif HTTP/1.0
       Accept: */*
       Referer:
    http://www.google.com/search?hl=en&q=hanselman
       Accept-Language: en-us,es-mx;q=0.7,en-gb;q=0.3
       User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR     2.0.40607)
       Host: 127.0.0.1:4664
       Connection: Keep-Alive
       Pragma: no-cache
  • OY! Google's hooked WinInet.dll I think.  This works in Opera, in FireFox, in anything.  They are grabbing all traffic that goes to Google and injecting their own stuff in the results.   When I launched Opera, I noticed that Google's two networking DLLs loaded in-proc.

It's going to change the world.  Certainly more than Segway. ;) 

Now, I hope they don't try to include Desktop AdSense.

"Looks like you're searching your hard drive for Porn! Try our sponsored links!"

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.