Scott Hanselman

New Technology Podcast - RunAs Radio with Greg Hughes and Richard Campbell

April 11, '07 Comments [1] Posted in Podcast
Sponsored By

Happy 40th Birthday to Greg Hughes.

To celebrate his birthday, go checkout his new Podcast with Richard Campbell called RunAs Radio.

As with all Pwop shows, the audio quality will be excellent. Richard says:

I did get a fancy new recording rig to make all this work. My broadcast mike plugs into a MOTU Traveller that uses Firewire into Terrance, my 4960x1600 x64 XP beast. Also plugged into the MOTU is a Telos ONE+ONE for capture two telephone lines: one for Greg, and one for the guest. So I record my channel, Greg's phone track and the guest. Greg also does a local recording of himself (maximum quality, of course) and then all that is combined to make a show.

And Greg used my Samson Mic, Stand and Spit Pop Filter. Greg says:

It's a weekly IT podcast with a Microsoft technologies focus. Richard and I will discuss all sorts of relevant topics with a variety of smart and interesting people.

I have a great deal of respect for both Greg and Richard. They are both deeply technical and well-versed on a huge number of topics that the IT community cares about, and Greg also has a very strong security focus as our Chief Security Executive here at Corillian. I'll definitely be listening to this show on my drive home.

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

Fix: "General Failure" while launching FireFox URLs from Outlook

April 11, '07 Comments [9] Posted in Musings
Sponsored By

There seems to be an ongoing chaotic series of bugs, or bug, around "Set as Default Browser" and FireFox. Recently I updated my FireFox to 2.0.0.3 and suddenly whenever I click on a URL in Outlook I get a message box with "General Failure." Occasionally I'll get a "Locate Link Browser" message as well.

The issue seems to be some of the old Windows DDE stuff where a DDE message is sent to an application after it started up to pass information - in this case, the URL. Today, we prefer to pass the URL on the command line. It also makes for a faster launch.

Even though this was a problem with FireFox 0.9, it's still happening today. (I'm not the only one). John Haller has a fix in the form of a Registry File.

You can also make the change yourself in the Explorer UI via Tools|Options|FileTypes. Go to the ones marked (NONE) and start with URL:HyperText...and go to Advanced, then Edit the Open action and clear out the DDE Message TextBox.

Unrelated Aside: John's even got a theme and tools and hacks to make FireFox 2 look like IE. Stunning.

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

Adding PNGOUT to the Explorer Right Click Context Menu

April 11, '07 Comments [6] Posted in Musings | PowerShell | Programming
Sponsored By

I've been creating more PNGs lately on the blog. However, the default PNGs created by most tools are fat fat fat. PNGOUT to the rescue.

So, now I use PNGOUT to compress all PNGs before they are uploaded to the blog now. It's wonderful. It looks like Rick "Paint.NET Guy" Brewster is also enamored with PNGOUT and is considering integrating support directly into PAINT.NET although there might be legal issues. I'd be happy with a simple "call PNGOUT when you're done" option. Poof, we've avoided any legal trouble.

I know there's lots of Windows Apps that front PNGOUT and other PNG apps, but I like my things integrated and automatic.

Thoughts:

  • I wonder if someone could write a Windows Live Writer Plugin to run PNG out on files created by WLW before they are posted?
  • Since I'm using Kenny Kerr's Window Clippings to create the PNGs, it'd be more expedient to ask him to add the "Call PNGOUT when you're done"-feature to his tool.
  • I think I'll just integrate PNGOUT with the shell, it'll be faster...

Create PNGOUT.reg file that looks like this:

Windows Registry Editor Version 5.00 
[HKEY_CLASSES_ROOT\pngfile\shell\PNGOUT]
[HKEY_CLASSES_ROOT\pngfile\shell\PNGOUT\command]
@="\"C:\\Utils\\pngout.exe\" \"%1\""

Make sure you change your path to PNGOUT to match reality. Now you have this available in Explorer:

Optimizing all existing PNGs on my blog

Ah, but I also need to tidy up the EXISTING PNGs from my site. First I'll download all the PNGs to my local drive, then fire up PowerShell and run this command that will recurse everywhere in the current directory and below and run PNGOUT on all the PNGs, replacing them in place:

get-childitem . -include *.png -recurse | foreach ($_) { pngout "$_"}

Uploaded, and now I've taken my total PNG size (of all PNGs in all posts on the blog) from 40,004,166 bytes to 23,004,247 bytes a savings of about 42%. That'll add up in bandwidth costs.

You can also optimize the autogenerated PNG files within Windows Live Writer by running that same PowerShell command on the files in

%APPDATA%\Windows Live Writer\PostSupportingFilesWriter\PostSupportingFiles

It's a shame that most default libraries for PNG make such large PNGs, considering that this is the "picture format design for the web." Thanks PNGOUT!

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

Blogging to DasBlog from Word 2007

April 11, '07 Comments [13] Posted in DasBlog | Musings
Sponsored By

If this works, I've blogged to DasBlog from Word 2007. Why would I want to do this?

Looks like it works fine except for pictures. According to Ken (a developer on the DasBlog team) the Word 2007 implementation of the metaWebLog API's "newMediaObject" method is broken. They are passing a string but calling it an int, and DasBlog is pretty strict.

I can see where I might find myself on a computer that had only Word 2007, and rather than using the Web Interface I might want to blog from Word.

There's also the comfort level - that seems to me to be the most compelling reason. Word is comfortable, and being able to post to one's blog here would be very natural for most writers who live in Word already.

I might set this up for my wife as she's already comfortable with Word and Office. We'll get the picture/media thing worked out and I'll have Mo give it a try.

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

Accessing Mapped Network Drives via ASP.NET in IIS 6

April 11, '07 Comments [2] Posted in ASP.NET
Sponsored By

A question came up at work today, "How do I access mapped network drives in ASP.NET under IIS 6? It worked before I got IIS 6 and Windows 2003."

IIS 6 and Windows 2003 are considerably more locked down versus previous versions. Additionally, accessing drives via mapped drive letters is frowned upon, likely the layer of redirection, as drives can be REMAPPED by evil-doers.

The preferred way to access network shares is via UNC.If you really wanna use Mapped Drives, there's KB257174.

There's also KB207671 on "How to access network files from IIS applications." This is a pretty funny KB, specifically because of it's first suggestion:

Following are ways to avoid problems when you access network resources from your IIS application:

  • Keep files on the local computer.

This is the equivalent of the classic "Doctor, it hurts when I do this." "Well, don't do that."

The most useful tip in that KB article is the one about Auditing Logons. Rather than guessing or treating IIS as a black box, turn on Login Auditing:

If you cannot determine what kind of logon is occurring on your IIS server to handle requests, you can turn on auditing for Logons and Logoffs. Follow these steps:

1. Click Start, click Settings, click Control Panel, click Administrative Tools, and then click Local Security Policy.

2. After you open Local Security Policy, in the left Tree View pane, click Security Settings, click Local Policies, and then click Audit Policy.

3. Double-click Audit Logon Event and then click Success and Failure. Event Log entries are added under the Security log. You can determine the kind of logon by looking at the event details under the Logon Type:

  2=Interactive, 3=Network, 4=Batch, 5=Service

 No matter how you choose to accomplish your goal, always be aware of the Identity of your Worker Process. That might be ASPNET_WP or W3WP and it might be NETWORKSERVICE, or IUSR_MACHINE Name. Always use the weakest possible user, and make sure the files and the share have the minimal access needed. Don't run your Worker Process as anyone with any power or Administrator to solve file access problems.

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.