Scott Hanselman

A potential CAPTCHA Comment Spam Solution for dasBlog (and others) with no recompile or code changes

November 11, '04 Comments [10] Posted in ASP.NET | DasBlog
Sponsored By

I took Jeff Atwood's CAPTCHA example and added a new event called "UserValidationEvent"

Public Event UserValidationEvent As EventHandler

Then I raise the event at the VERY end of ValidateCaptcha I raise it:

RaiseEvent UserValidationEvent(Me, New EventArgs)

I made it a separate event because I want the CaptchaControl to integrate with my blogging software WITHOUT any code on the server side.  I didn't want to have to recompile dasBlog or check anything in the Page_Load.

I made the appropriate web.config changes as per Jeff's instructions, and I added the control to the CommentViewBox.ascx and put this code at the top:

<%@ Register TagPrefix="cc1" Namespace="WebControlCaptcha" Assembly="WebControlCaptcha" %>
<script Language="C#" Runat="Server">
  protected void Foo(object sender, System.EventArgs e)
  {
  if (Page.IsPostBack == true && CaptchaControl1.UserValidated == false)
   {
    Response.Redirect(Request.RawUrl);
   }
  }

  protected void Page_Load(object sender, System.EventArgs e)
  {
   //Ya, ya, I know I could have hooked this event up a number of ways
   // including AutoEventWireUp but I like this fine, and it feels
   // more explicit to moi.
   CaptchaControl1.UserValidationEvent += new EventHandler(Foo);
  }  
</script>

There are a few Font issues to work out...he has it setup with a number of "no-no" fonts, while I'd prefer a list of "allowed" fonts. 

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

CommentSpam: It has begun, next steps?

November 10, '04 Comments [12] Posted in DasBlog
Sponsored By

Some one has started comment spamming me. What's the comment spam solution for dasBlog (other than turning them off?)

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

Halo 2: There's more to it than you think. Have you seen the "GameViewer?" And the Games RSS Feed?

November 10, '04 Comments [6] Posted in ASP.NET | Gaming
Sponsored By

Ya, ya, the graphics are great, game of the year, whee.

What's REALLY interesting is the ASP.NET application that runs Bungie.NET. You can link your Passport and XBox Live Gamer Tag and get statistical data on every game you (or anyone) has ever played.  You can get details on clans, maps, friends, everything.

For example, here's a game (#650296) where Robert McLaws spanked me. Here's every game I played last night. Here's the details on Clan "Zen."

There's a depth to their data gathering that goes far beyond the game itself, and beyond anything XBox Live or any major massively multiplayer thing I've ever seen.

Additionally, are you ready for this? To the right here is a "GameViewer" with a view of each game, including perspectives on exactly where Robert kicked my ass in this specific game instance.

If that's not all? How about an RSS Feed of all my Halo 2 games? 

Drink that in my friends. I wonder if there's some OLAP in there. I'd be fascinated to see the database schema.

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

The Scary Google Desktop Search Hacks have begun...now, search more file types

November 10, '04 Comments [1] Posted in XML
Sponsored By

Good Part: John Batdorf showed me that they've already hacked Google Desktop to search more file types.  Google Desktop Search Plus (GDSPlus) from Larry Gadea will search more kinds of text files (XML, SQL, BAT) as well as source files!

Scary Part: You have to installed patched binaries. Oy. Not for the faint of heart.

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

UPDATE: GotDotNet Workspaces Troubles Solved, RTFM anyone?

November 9, '04 Comments [2] Posted in ASP.NET
Sponsored By

The stunning Betsy Aoki, the Community Program Manager for MSDN and TechNet emailed me earlier with details on my recent GotDotNet troubles. (Reminder, I met Betsy at a recent Nerd Dinner. She found me to be dapper, and preceded to be cyber-stalked by one Phil Weber ;) )

Betsy has kindly pointed out that most of the GDN problems are caused by what she calls "unclean Passport cookies." I'm unclear on why I'm unclean, but a clear of the browser cookies and cache and a little mercurachrome cleared the whole thing right up.

She has also seen fit to update the GotDotNet FAQ with all the details on how to fix troubles you may have.

Turns out that not all that fails to glitter fails on the server-side, if I may mix my metaphors. The new GDN FAQ has good information that solved my problem; do spread the word to people in need of assistance.

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.