:::: MENU ::::

Friday, February 25, 2011

A great little utility called smtp4dev. It's an SMTP server that listens on your local machine, and instead of relaying e-mail, it'll capture them and store them in a queue so you can review and open them.

It's brilliant – simple and elegant and incredibly easy to use. Just configure your application (website, debugger, logging framework – whatever it is you're building) to send mail on localhost:25, fire up smtp4dev, and watch the messages pile up.

Binaries and source are at smtp4dev.codeplex.com – well worth a look if you ever write software that sends e-mail.

 

Thursday, February 24, 2011

Chances are, at some point you've tried creating a new user account on a website and were told that the username you selected was already taken. This is especially common on very large websites with millions of members, but can happen on smaller websites with common usernames, such as people's names or popular words or phrases in the lexicon of the online community that frequents the website. If the user registration process is short and sweet, most users won't balk when they are told their desired username has already been taken - they'll just try a new one. But if the user registration process is long, involving several questions and scrolling, it can be frustrating to complete the registration process only to be told you need to return to the top of the page to try a different username.

Many websites use Ajax techniques to check whether a visitor's desired username is available as soon as they enter it (rather than waiting for them to submit the form). This article shows how to implement such a feature in an ASP.NET website using Membership and jQuery. This article includes a demo available for download that implements this behavior in an ASP.NET WebForms application that uses the CreateUserWizard control to register new users. However, the concepts in this article can be applied to ad-hoc user registration pages and ASP.NET MVC.

Read more!

 

This is one of those simple tip posts that may seem obvious and taken for granted by those of us who have been working with SQL Server for a while now but maybe a newbie or two out there will find this helpful.

 

Every so often (just this morning!) I find myself resetting an identity column value back to 0 after I've deleted all the existing records so the table gets a fresh start at primary key 1. Yes, I know all about primary keys not changing and how the value in the primary key doesn't matter and so on. Sometimes I just like the primary keys starting at 1.

 

The following line resets the Identity value for the Customer table to 0 so that the next record added starts at 1.

 

DBCC CHECKIDENT('Customer', RESEED, 0)

 

Have a day. :-|

 

Thursday, February 3, 2011

WiX toolset v3.5 is now officially declared Production/Stable. The final build number is 3.5.2519.0. You can download it from here.

WiX v3.5 delivers official support for Visual Studio 2010 and IIS7. The standard UI also supports a quite few more languages (but not all of those) and we simplified the WiX language a bit. Plus there are a bunch of bug fixes in WiX v3.5 that makes this release the best version of the core WiX toolset ever released.