Wednesday, December 19, 2007

As you're probably already aware, Microsoft recently RTM'd Visual Studio 2008.  Well, I had a moment to come up for air the other day and decided it was time to upgrade my machine to this newest encarnation.  I must say that the installation was probably one of the easiest I've ever done.  The product installed very smoothly without even a hiccup.  Also, much to my delight, ReSharper 3.0 continues to work flawlessly with VS2008! :-)

Having played around with the Beta and CTP versions of VS2008 I was very excited to move onto the released version.  It's flat out awesome!

Highly recommended!

Wednesday, December 19, 2007 2:47:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Thursday, December 06, 2007

As a special treat this year my company was kind enough to bequeath me a copy of Adobe Creative Suite 3: Master Collection.  I've been giddy with delight as I'm a long time user of both Photoshop and Illustrator and absolutely swear by the products.  I've had it sitting on my desk here for a few days and just tonight am getting the opportunity to install it.

Of course, as with most everything, things don't always go according to plan.  Not two seconds after starting to install, I was greeted with the most pleasant and informative error message and the setup aborted:

Setup has encountered an error and cannot continue.  Contact Adobe Customer Support for assistance.

Internal Error 2739

Though slightly disheartened, I sought a resolution on Adobe's site and didn't find anything.  However, after a single search on everyone's favorite search engine I found a resolution.  Though the solution is simple (regsvr32 jscript.dll) I would have never guessed it.  Thanks, Gopinath M for the great tech tip!

Thursday, December 06, 2007 11:04:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, November 26, 2007

I have a website that I created that uses an ASP.NET Login control to assist in user authentication on the site.  I've used the Login control on other sites and it's provides a very convenient mechanism for authenticating a user.  On this site particular site I have the Login control contained within a wrapper control (which I called LoginBox).  Due to the nature of this site, the LoginBox does not exist on the page in the ASP.NET HTML markup but rather is added to the page dynamically.  As such I don't have the convenience of editing the HTML markup of the asp:Login control directly but must interact with it programmatically.

The Login control provides several properties through which I can achieve a nice look and feel.  It contains child controls for the title, labels, textboxes, required field validators, checkboxes, and buttons.  Each of these can be customized via CSS styles or by directly assigning values to the controls' properties.

In this particular site I needed to extend the appearance of the control, adding some textboxes to the control.  At first this wasn't very intuitive, but I'll show you that it is, in fact, quite easy to achieve.  You can easily add fields to the control (e.g., a 'verify password' field, an 'email' field, a CAPTCHA control, etc) by customizing the LayoutTemplate of the Login control.

Were I to have had the control in the HTML markup of my page this would be a piece of cake.  Note, via the designer, you can simply click the Login control's smart tag and click “Convert to Template“ or create it manually:

<asp:Login runat="server" id="login">
  <LayoutTemplate>
    <!-- HTML template here -->
  </LayoutTemplate>
</asp:Login>

However, as the control is being generated entirely in code, the template must be created programmatically.  As a bare minimum, you need two controls in your template that implement the ITextControl interface for the control to render; otherwise, you'll get an exception (TextBoxes will suffice or any control you create that implements that interface).  These controls are UserName and Password.  I recommend adding the login button as well (Button, LinkButton, or ImageButton) with a CommandName set to “Login“.  Using a template, you can fully customize the look and feel of the output.  Note, that when you go the route of creating a custom template, you are solely responsible for the output.  In other words, you're completely replacing the output that the Login control generates; if you want field validators, you need to add them.

// somewhere in the page (e.g., Page.Init)
Login login = new Login();
login.LayoutTemplate = new LoginTemplate();
Controls.Add(login);

internal class LoginTemplate : ITemplate {
  public void InstantiateIn(Control container) {
    TextBox txtUserName = new TextBox();
    txtUserName.ID = "UserName";
    container.Controls.Add(txtUserName);

    TextBox txtPassword = new TextBox();
    txtPassword.ID = "Password";
    container.Controls.Add(txtPassword);

    ImageButton btnLogin = new ImageButton();
    btnLogin.ID = "LoginButton";
    btnLogin.ImageUrl = "~/images/LoginButton.gif";
    btnLogin.CommandName = "Login";
    container.Controls.Add(btnLogin);
  }
}

With this, I have an extremely boring-looking Login control, but you get the idea.

When the page is posted back, you can easily retrieve the contents of any control you added to the template by calling the .FindControl() method, referencing it by name:

string emailAddress = ( ( TextBox )login.FindControl("txtEmail") ).Text;

Monday, November 26, 2007 3:36:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [3]  |  Trackback
 Saturday, November 03, 2007

I had the opportunity to present at the Utah Code Camp today on the topic of Regular Expressions.  This topic is near and dear to my heart, but (being my worst critic) I feel that I couldn't get my act together.  In part I feel that the presentation went very poorly; it was definitely among my worst.  I felt my explanations lacking, incomplete, or erroneous, my examples unsuccessful or poor, and my 'togetherness' absent.  It was a very far cry from a similar presentation I had given back in Sept 2006 to the Utah .NET User Group which was among my best I feel.  That made it all the more disappointing for me.

I guess on the positive side I've updated my RegexTester application and it's available for download here.  Thanks to all that came and participated.  We had a great turnout to the event so that was very positive.  I just wish my presentation hadn't ruined my day...it's been lousy ever since.  I guess you can't win them all.

Saturday, November 03, 2007 1:54:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [3]  |  Trackback
 Wednesday, October 31, 2007

Please join us at the Utah Fall Code Camp this coming Saturday, November 3rd, 2007.  This event is going to be excellent!  Come check out the site, register, browse the schedule and more.  Here's the official announcement:

Utah Fall Code Camp

Nov 3rd 2007

Neumont University

Salt Lake City, UT

www.utcodecamp.com

 

The local Users Group Community is conducting a “Code Camp” for local software programmers at Neumont University. This Camp is Free to all.

 

We have a diverse topic range for this code camp. You can see the full list of sessions and speakers at www.utcodecamp.com We will be giving away at least one IPOD, software, Shirts, Books and Lunch and Breakfast will be provided. 

 

You will need to register on the site to be eligible for some giveaways so you need to go register now at www.utcodecamp.com if you haven’t already. If you registered on www.msutahevents.com you will need to re-register at the code camp site.

Wednesday, October 31, 2007 7:08:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, October 19, 2007

If you're developing ASP.NET applications on Windows Vista that are utilizing the Visual Studio-provided web server (a.k.a., Cassini) then you may have run into an issue where, when attempting to debug your website, Visual Studio immediately drops out of debugging once your application starts.  That is, you press F5, the browser pops up and displays the website and Visual Studio stops debugging and drops back into its standard development mode and the browser continues on running.  Your breakpoints are no longer active and you essentially can't utilize your development environment to troubleshoot issues with the site.

This has been happening to me of late.  I don't usually use the debugger in that sense to 'walk through' my code for a variety of reasons, but tonight I needed to.  Sure, I could attach to the process (WebDev.WebServer.exe), but that's a pain and I get tired of constantly attaching and detaching.

The culprit in my case was that http://localhost was in my Local Intranet zone in IE and, using IE 7 and Vista, I'm not authorized to debug intranet sites.  The solution is an easy one: move http://localhost to the Trusted Sites list in Internet Explorer.  Now the debugger attaches and remains attached, greatly simplifying the debugging process.

Friday, October 19, 2007 4:45:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [12]  |  Trackback

Thanks to everyone that came out to the Utah .NET User Group lunch today at Olive Garden.  We had a great turnout and a great time.  I think in the future we'll be holding the lunch around I-15 and I-215 as it's a major intersection and a great place to gather.  Any time we've attempted to hold the lunch elsewhere has resulted in just a small handful of people (3-4) whereas all of our lunches in the Fashion Place area have resulted in 10+ (today we had 14 if I recall).

Anyway, it was great to see everyone and we'll be doing it again in the future - maybe at the new Cheesecake Factory that opens next month...we'll keep everyone posted.

Friday, October 19, 2007 7:17:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, October 16, 2007

Later tonight (as it is now officially tomorrow being 3:26 AM) I have the opportunity to present on the topic of Design Patterns at the Utah County .NET User Group in Provo, UT.  This will largely be an adaptation of my Sept 2007 talk to the Utah .NET User Group, but I might throw in some new stuff.  I'm looking forward to it as I always am.  Come join us and see you there!

Time: 6:00 PM
Date: Oct 17th, 2007
Place: NuSkin building (1175 S 350 E, Provo)

Tuesday, October 16, 2007 8:26:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, October 15, 2007

Back when I was a trainer (years ago now), we had a little inside joke; it's pretty industry-wide in fact, but it was fun nonetheless.  You've heard of the ID10T (pronounced Eye-Dee-Ten-Tee), of course.  We had another known as the PBKACH (pronounced Peeb-Cache).  Essentially it stood for “Problem Between Keyboard and Chair”.  Well, today I experienced this first hand - literally.

Apparently, this particular server went down on Friday.  That is, no users could connect to it via VPN, all web services were down, the virtual servers were down.  No matter what the users tried a connection could not be established.  Any attempts to connect to or contact the server would fail.

Attempting to reboot the server remotely via the DRAC (Dell Remote Access Controller) interface would freeze at the following screen:

Any attempt to gain physical access to the server over the weekend was denied, but today when we got into the server room the problem was immediately obvious.  It wasn't a hardware failure as suspected and feared.  It was a literal PBKACH error.  In setting up the server rack, apparently the keyboard was placed on top of the server.  Additionally, a folding chair (poised on a small box) was also placed in the rack, precariously positioned above the keyboard:

Well, one thing led to another and the chair had slid off of the box and landed squarely on the ESC key of the keyboard, holding it down.  In and of itself this wasn't much of an issue except when the server rebooted (through an Automatic Update in Windows) the depressed ESC key was aborting the reboot and stalling it out.

No amount of remote access would have been able to remedy the issue - unless, of course, we were to install a 'rumble pack' in the server - I'll have to look into that one.

So after a good laugh, we chalked this one up as a good ol' traditional (and literal) “Problem Between Keyboard and Chair” and moved on. :-)

Monday, October 15, 2007 9:27:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [3]  |  Trackback
 Sunday, October 14, 2007

I had the opportunity this past Friday (Oct 12th, 2007) to go to Seattle to represent Experlogix in the CRM 4.0 Partner Readiness Event.  We (Experlogix) and Scribe Software are the two sponsors that are participating in this event as it occurs across the United States over the next several weeks, so it's very exciting to be participating in this exclusive event.

As Experlogix is a sponsor of the event, I had the opportunity during the lunch break provide a 20 minute presentation on Experlogix and the web-based product Configurator.  I was very pleased with how smoothly everything went; it was great!  We got excellent feedback for the demonstration and a lot of interest.

It was a bit of a whirlwind trip for me as I flew in in the morning, talked to some MS partners, shared my demonstration/presentation, and flew out in the afternoon.  I have the opportunity again to represent Experlogix on Nov 1st in Denver for a similar event.  I'm really looking forward to it.

Sunday, October 14, 2007 6:03:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback