Scott Hanselman

Continuous Integration for .NET - Patrick Cauldwell and I will be at PADNUG on Weds, April 27th, 2005

April 23, '05 Comments [1] Posted in Corillian | Speaking | NUnit | Nant
Sponsored By

Patrick and I will be speaking (extemporaneously, we assure you) at the Portland Area .NET User's Group Meeting this Weds, April 27th, 2005 at 6:30pm.

Join Patrick Cauldwell and Scott Hanselman as they talk about one of Corillian's product's build processes. They will explore NUnit, NAnt, custom NAnt Tasks, automatic reporting of errors, and unit test failures as well as Cruise Control.NET which can enable you to create an Enterprise Wide Build Dashboard for all the pointy-haired bosses to oogle at. It'll be fun, informative, and fast pace.

WHERE:
Portland Community College Auditorium
CAPITAL Center, Room 1508
18640 NW Walker Rd.
Beaverton, OR 97006

WHEN:
4/27/2005
6:30pm

WHY:
Come for the Pizza, stay for the...well, for the Pizza!

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

Internationalized Regular Expressions

April 23, '05 Comments [10] Posted in ASP.NET | Javascript
Sponsored By

UPDATE: There's more on Internationalized RegExs in this StackOverflow question.

I was trying to make a regular expression for use in client-side JavaScript (using a PeterBlum Validator) that allowed a series of special characters:

-'.,&#@:?!()$\/

Plus letters and numbers and whitespace:

\w\d\s

However, I mistakenly assumed that \w meant truly "word characters." It doesn't, it means [A-Za-z].

That sucks. What about José, when he wants to put his First Name into a form?

Well, I could do a RegEx that denies specific characters and allows all others, but I really just wanted to support Spanish, French, English, German, and any language that uses the general Latin Character Set.

So, here's what I have.

^[
  ÀÈÌÒÙ àèìòù ÁÉÍÓÚ Ý áéíóúý
  ÂÊÎÔÛ âêîôû ÃÑÕ ãñõ ÄËÏÖÜŸ
  äëïöüŸ ¡¿çÇŒœ ßØøÅå ÆæÞþ
  Ðð ""\w\d\s-'.,&#@:?!()$\/
]+$

Did I miss anything? (Ignore the  whitespace for the purposes of this post's RegEx)

It's lame that \w doesn't work on the client-side based on your browser's locale. This makes it difficult for your RegExes to have parity between the client and server.

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

Wow, that's cool...the new book

April 22, '05 Comments [6] Posted in ASP.NET
Sponsored By

Wow, I just noticed this. Coming soon...Amazon.com Sales Rank: #264,558 in Books We're coming up fast! ;) Bite me, Harry Potter! (The book ships when .NET 2.0 ships, FYI)

 

 

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

KB 810886 The network BIOS command limit has been reached - Why Does All the Crazy Crap Happen to Me?

April 22, '05 Comments [4] Posted in ASP.NET | Bugs
Sponsored By

Kb810866Why is it all the crazy stuff happens to me? I mean SERIOUSLY crazy.

I am running a VirtualPC with Visual Studio Beta 2 inside it, and I like to keep my code out of the VM and safe on my system. So, I usually share a folder using the Virtual PC built in sharing.

However, for some reason, BETA 2 doesn't like it like BETA 1 did and I get "Failed to Monitor Directory Changes."

I did give this drive (my Z: Drive) full trust, though:

caspol -q -machine -addgroup 1 -url file://z:/* FullTrust -name "Z Drive"

This way .NET won't freak out that I'm running and debugging off a non-attached drive.

But, it still wasn't feeling it, so I disconnected the VirtualPC Drive and did a straight Mapped Drive/Network Share from my VirtualPC to my Host OS. After a few builds within BETA 2 I received this charmer from the Yellow Screen of Death:

"The network BIOS command limit has been reached. See KB 810866."

WTF?! Um. Ok. Believe me, I couldn't have been more shocked if the thing had told me that my CMOS Battery was dead and that I should run SpinRite to reformat my MFM hard drive. Sheesh. Do I need to load freaking QEMM into the UMB to get this thing to work? EMM386.EXE anyone? Can I get a TSR please? Is Trumpet Winsock installed?

Ah, how comforting that there are exactly TWO instances of this on Google, THEY ARE THE SAME SITE, and more interestingly, that I shall be #3.

Google Groups you say? The USENET? Of course. Um, NO. Exactly ONE message from two months ago and that guy received the standard flame - "Why would you want to do that?" (actually he was a little lower level, actually programatically setting up file change notifications within his own app to fiels located on network shares. But still.)

So, I'm told to check out, yes, wait for it, wait for it, the LanManager Workstation and Server keys in the Registry's HKLM/System/CurrentControlSet/yadayadayada.

Serenity now!

Coming Soon, Longhorn from the makers of LanMan and EDLIN!

But I'm not bitter.

Long story short, I shall be doing my BETA 2 dev locally.

NOTE OF SANITY: Before you freak out also, rememeber, this is using the new Cassini-style local web server, NOT IIS. Basically the local web server assumes its, well, local. So, it sets up some local file watchers that are a bit too chatty for the SMB Network Protocol. Yes, I tried upping the Registry Key values from the KB. No, it didn't work.

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

Updating from early ASP.NET Beta builds to Beta 2

April 22, '05 Comments [2] Posted in ASP.NET
Sponsored By

If you're upgrading some mid-BETA or CTP ASP.NET 2.0 code and you get some cryptic messages like

  • c:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Temporary ASP.NET Files\chapter 10 - 8 - csharp\3e344bac\60be3ec8\-sngkrtn.0.cs(265): error CS0115: 'ASP._Default_aspx.FrameworkInitialize()': no suitable method found to override
  • 'ASP._Default_aspx.FrameworkInitialize()': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Temporary ASP.NET Files\chapter 10 - 8 - csharp\3e344bac\60be3ec8\-sngkrtn.0.cs 265 
  • 'ASP._Default_aspx.GetTypeHashCode()': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Temporary ASP.NET Files\chapter 10 - 8 - csharp\3e344bac\60be3ec8\-sngkrtn.0.cs 272 

You'll need to make a few changes. First, you probably already updated your ASPX Markup.

In your ASPX page:

OLD: <%@ Page Language="C#" CompileWith="Default.aspx.cs" ClassName="Default_aspx" %>
NEW: <%@ Page Language="C#" codefile="Default.aspx.cs" Inherits="Default_aspx" %>

In your ASPX.CS source file:

OLD:     public partial class Default_aspx  
NEW:     public partial class Default_aspx  : Page

No free derivation any more, you have to explictly derive from a class that ulitmately derives from System.Web.UI.Page. It is that derivation that will get ride of the override compiler errors seen above. This who post also applies to pages written in VB.

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.