Archives

Archives / 2003
  • Production Database Migration

    I thought I'd share my experience with moving a heavily used production database for a live website from one server to another this weekend.  The database in question is used to support AspAlliance.com, but since it has been around for a long time, and since getting additional databases has not always been easy or free, there are several other sites that rely on this same database.  Additionally, on AspAlliance.com there are a large number of individual ASP and ASP.NET applications, many of which store their connection string information locally.  I'm still not 100% done tracking down all the apps that need updated, but the important ones are done.

  • Evolving Custom Web Controls

    Although sometimes you start out knowing you need a custom control, what more often happens is you find that you're using the same functionality in more than one place, so you start packaging it up into a control in order to remove duplication and improve reusability.  This article takes a look at when and how you should do such things by taking a fairly simple piece of ASP.NET functionality and evolving it from some code on a form to a user control to a fully-functional custom web control.

  • Newsgator Activation

    Ok, so I got newsgator last week (http://weblogs.asp.net/ssmith/posts/41415.aspx) and today was the first day since then that I actually rebooted my machine and got the nag prompt to activate it when I started Outlook.  So, having become enthralled with the product, I decided what the heck and spent the $29 to buy it.  Got my activation key in an email a few minutes later, life was good, I clicked on NewsGator in Outlook and went to find the Activate link.

  • Newsgator 1.3

    I've never used Newsgator before but since I just redid the RSS feed on AspAlliance.com I thought I should give it a shot and see how it works (I've also only recently gone to Outlook from Outlook Express (see past archives for my thoughts on the switch)).  I have to say I really like it and am starting to subscribe to a bunch of blogs that previously I would manually periodically check with my browser (I know, how archaic is THAT).  So now, that thing on the side of my blog that says 'Blogs I Read' will actually be a bit more accurate, since I'll get notified of new posts to those blogs in semi-realtime.

  • Speaking At Memphis DNUG

    I'll be speaking at the Memphis .NET User Group on Tuesday, 11/18.  I'm going to be giving an overview of ASP.NET Whidbey, which of course has recently been made public at the Microsoft Professional Developers' Conference 2003 in late October.  For more information and directions to the event, see the MNUG website.

  • Regex To The Rescue For Shorter URLs

    I've been redesigning AspAlliance.com off and on for the last several months, and I made a few more changes this morning.  The big one that is noticeable to the general public is the URLs.  Instead of having to link to articles via a viewer ASPX page and a series of querystring values, it is now sufficient to simply append the article ID to the end of the domain name (after a slash), like so:

  • PDC 2003: Caching Birds of a Feather : Summary of Tips

    I hosted a Birds of a Feather Tuesday night at PDC 2003 and we had about 25 or 30 people attend, including Rob Howard of the ASP.NET team (responsible for the caching featureset).  I've published a summary of the tips along with some resource links we discussed at the meeting on AspAlliance.com:

  • PDC ASP.NET Panel Discussion - Non-Postback Callbacks to Pages

    A new feature in Whidbey will allow controls to make calls directly back to page methods without making full postbacks.  This features uses XMLHTTP behind the scenes and allows controls to talk to the server in an optimized fashion without requiring a full postback.  In the 1.x timeframe, a solution for this which you can use today (and which actually may be simpler to implement based on what I've seen), is remote scripting.  Remote scripting was available in ASP 3.x but wasn't widely known to most ASP developers.  Jonathan Cogley of AspAlliance has written up a toolkit that makes implementing cross-browser remote scripting (non-postback callbacks to the server) very easy to implement in ASP.NET, including 1.x.

  • ASP.NET Whidbey Discussion Lists Launched

    AspAdvice.com now has about a dozen lists set up for the discussion of ASP.NET Whidbey.  If you've got the PDC bits, this is a great place to look for help if you get stuck with something.  Many of the members of these lists will be folks who have had access to the bits for some time and of course Microsoft employees themselves.  You'll find the full list of signups here:

  • Tuesday at PDC

    Managed to get to some sessions today, including the morning's keynote, which was lucky since I was out pretty late with a bunch of Codewise community members and Microsofties.  The keynote was pretty cool, and included an excellent demo by Scott Guthrie as well as a fun demo of mobile control support by Batman.  I spent most of the middle of the day in the expo hall talking to various vendors about what they're doing in the .NET space and how ASPAlliance and AspAdvice can help them reach the developer community.

  • Hope LAX Is Open For me...

    Well, I'm leaving Ohio in about 4.5 hours for Atlanta, then getting into LAX (in theory) at 10am local time.  Hopefully the airport won't be burned down or closed or anything.  See everyone in PDC if I make it there.

  • 34 Hours to Departure for PDC 2003

    My flight leaves at 0535 Monday morning from Akron-Canton, getting me into Los Angeles at 0951.  I figure I'll probably make it to the hotel by 11am and the convention center by noon, which means I'll miss the keynotes.  :(

  • 34 Hours To Departure for PDC 2003

    My flight leaves at 0535 Monday morning from Akron-Canton, getting me into Los Angeles at 0951.  I figure I'll probably make it to the hotel by 11am and the convention center by noon, which means I'll miss the keynotes.  :(

  • Outlook 2003 + Spam Bayes Rocks!

    I'm still on the Beta of Outlook 2003 - I'll upgrade to the release version at some point.  But I just installed SpamBayes and I have to say that so far I'm very happy with it.  It's not totally “trained” yet (it's only been about 8 hours, but I get about 100 spam in that time), but it's only categorized 2 things I wanted to have as possible spam (and they were automated emails), and nothing has been junked that shouldn't have been.  No spam has made it to my Inbox, either - it's all been put into Possible Spam.

  • Enums and Lookup Tables

    Everyone knows (or would know if they'd read Code Complete) that 'magic numbers' are a bad thing in your code.  Enumerated types, or Enums in .NET, are a great way to avoid such magic numbers.  For instance, let's say I have a content management system which has articles whose state can vary between Draft, Editing, and Production.  I could simply use 1, 2, and 3 for these states and remember what each stands for, but that's going to be really hard to look at six months later when I revisit the code (or if someone else has to read it).  In languages without enumerated types, named constants would be a step in the right direction, but truly enums are much more powerful because they allow me to limit the allowable values of parameters to only valid values.  For instance, I might have a method for updating the status of an article, called UpdateStatus(), which takes an integer articleId and an integer statusId.  There's nothing to prevent me from sending a -5 or a 300 to the statusId, which of course would not be valid status numbers, but are perfectly acceptable integers.  If instead I define the method so that it accepts an integer articleId and an ArticleStatus statusId, where ArticleStatus is an enumerated type, I'm assured that only valid values can be passed to that method (the compiler will enforce that).

  • Databinding Server Controls - Learned Something New

    I was running into an issue databinding an ImageButton's ImageUrl property to a string comprised partly of literal text and partly of a string I was pulling from my ConfigurationSettings.AppSettings collection.  I was using the standard <%# ... %> syntax for the databinding, but the result kept showing my databinding syntax in the button's URL, rather than the actual value.  It seems that while you can do the databinding to the control property, it's all or nothing.  So if you want the string to be:
    <asp:ImageButton ... ImageUrl=”/folder/<%# MyConfigVariable %>/Add.gif” ... />

  • "unexpected error creating debug information"

    I keep running into this issue in my multi-project VS.NET solutions.  For some reason, something is locking the dll(s) in the /obj/ folder of library components.  The fix that I have at the moment is as follows:

  • Caching Best Practices Article on MSDN website

    My first MSDN online article was published this week: ASP.NET Caching: Techniques and Best Practices.  The first half is pretty much well-known info about caching in ASP.NET (at least, it should be well-known to anybody writing ASP.NET applications).  The tips and the best practice pattern are the real valuable parts here for everyone who already knows the caching capabilities of ASP.NET, since these tell you why you should use caching and how to do it the most efficient way possible, which aren't necessarily apparent from the docs.

  • InfoPath Tidbit

    InfoPath forms can only be viewed and filled out by folks who have InfoPath installed... or can they?  As it turns out, InfoPath .xdr files are really just CAB files.  This means you can use the 'expand' utility (in Windows 2000 and later, I believe) to pull out the pieces of the XDR file, one of which contains a definition of the form (actually, one .xsl file per form).  With a little search-and-replace or perhaps another XSL transform, it would not be too terribly hard to convert the input controls used by InfoPath into, say, web controls, allowing the forms to be displayed via ASP.NET.

  • Dundas Chart Review

    I've posted a brief review of Dundas Chart 3.5 based on what I've used it for (no rocket science, but stuff that most of us probably could use for our apps, imho). You may read it here:

  • FTC Offers Guidelines to Reduce SPAM

    If you run any servers, even at home, you should probably read this and/or forward it on to anybody you know who manages servers.  As anybody with a clue can attest, SPAM is quickly clogging up not just our individual inboxes, but also the networks that make the Internet work.  Most of these messages are being sent by unsuspecting individuals' computers, not from the spammers' own machines.  Do your part to stop spam by protecting your servers.

  • InfoPath / XDocs

    I'm learning more about InfoPath (formerly XDocs), and it seems like it'll be a really cool addition to the Office toolset.  Has anybody had much of an opportunity to play with this using the beta?  What did you think?

  • RSS for Events

    RSS = Real Simple Syndication, I learned recently.  I've been wanting to implement something similar for events (of the calendar variety) for some time.  There are several formats in use today to describe events, but none are as pervasive and as widely used as RSS is for blogging and articles.

  • MS Passport - What are they thinking?

    Note - this is a rant I've had for a long time, not a response to anything new.  You can learn more about Passport here and here.  To get right to the chase, here's the part I think is ludicrous and detrimental to Passport ever getting any market share:

  • Outlook 2003 Beta

    Thought I'd blog about my experience thus far with the beta.  As I wrote in an earlier entry, I upgraded to Outlook 2003 Beta some weeks ago.  The results have been largely positive, but I do have a few complaints.  Here's the rundown:

  • The Caching Pattern

    Here's a little something that I term "the caching pattern" for using the ASP.NET cache object:

  • Trying out w.bloggar 3.01

    I just installed w.bloggar 3.01 and the WMPAmplog Plug-In. Let's see how it works... I used Daniel Bright's setup instructions to get set up in about 20 seconds. If you're reading this, everything must have worked. Ah, something for the wmpamplog FAQ - it doesn't work until you exit and restart Winamp. Pretty easy one to troubleshoot, though. Also looks like I'll have to set up my own CSS file to define class "media" for the music link...

    [Listening to: Send the Pain Below - Chevelle - Wonder What's Next (04:12)]

  • Hosting

    I've had enough people ask me for hosting advice lately to write up my thoughts in an article.  You can read about my experience with the people who make up ORCSWeb in this ASPAlliance article:

  • Outlook 2003 Beta 2 (was Outlook Express)

    I'm finally upgrading from OE to Outlook on the advice of Brian Tinkler of the Wisconsin .NET User Group (among many others over the past few years).  The main reason that I stuck with/chose OE over Outlook was that Outlook97 didn't have an easy way to select which FROM address to use for emails, and I was frequently switching between several POP3 accounts from several organizations.  OE had a nifty little dropdown, Outlook didn't.  Outlook97 combined with Visual Studio 1.0 also tended to totally slow down my P2-300 laptop that I had a few years back...

  • NUnit 2.0 And .NET 1.1 Together

    I spoke at the Wisconsin .NET User Group last night and had a good time.  A small part of my talk was on using NUnit to do unit testing and an introduction to Test Driven Development(TDD).  In the course of preparing my samples I upgrade to VS.NET 2003 from VS.NET 2002 and thus from .NET v1.0 to v1.1.  Unfortunately, I had a heck of a time getting NUnit to work after doing this, and was getting a security exception any time I tried to load a 1.1 compiled assembly.

  • SCSI Information

    Aaron Seet posted a link to this very long and very detailed analysis of SCSI vs. IDE hard drives, which I'm posting here for others to reference and also so I know where the link is so I can finish this long article.

  • What's an ASPInsider?

    Some of you have heard of a new group, the ASPInsiders.  Lately, I've been getting a lot of questions about this group such as who are they, are they a replacement for (insert another group here), how do I get in, etc.  Thankfully, the group has created an FAQ to answer these exact questions.  You can find the answers to these questions and more here.

  • Regular Expressions and ASP.NET Connections

    I completed my Regular Expression Cheat sheet a couple of days ago, so that I can hand it out this week at my session on regular expressions at ASP.NET Connections in New Orleans.  It's intended to be printable (thus it's not a complete reference - only the simple beginner stuff that fits on one page), so that someone could tack it up to the wall of their cubicle or tape it next to their monitor if they were new to regular expressions, didn't necessarily care to memorize all the little characters, but had to work with regular expressions nonetheless.

  • Caching and Callbacks

    I gave my second presentation to a user group for INETA this evening (well, last evening - it's late).  I spoke to about 70 members of the Philadelphia .NET user group, Philly .NET, about ASP.NET Performance Tips and Tricks and the Caching support in ASP.NET.  While I was discussing callbacks and the CacheItemRemovedCallback delegate that can be specified when an object is inserted into the cache, one of the users asked me a question that I wasn't sure of the answer to.  In my example, I was doing something like this:

  • Test Driven Development Article

    Eric Gunnerson at Microsoft has published an article on Unit Testing and Test Driven Development (he calls it Test First Development).  It does a good job of introdcuing the concept of TDD and showing how to use NUnit to perform unit testing of a class before and during its construction.  Another good resource I've found for TDD is the TDD Yahoo Group.  I'm hoping to write a few articles on the use of NUnit for data access component testing as soon as I'm finished with the redesign of ASPAlliance.com's article management system (which was to have been done last week).

  • Windows Server 2003 Notes

    I set up Win2K3 Server on a box at home a few days ago and here are some of the things I've learned.  The first thing I'd like to point out is that there is a pretty good Unofficial FAQ maintained by Windows XP MVP Larry Samuels.

  • San Francisco and Custom Paging

    Well, I'm out in San Francisco this week to teach ASP.NET with C# to half a dozen students, and that's going quite well.  I had the opportunity to see Alan Shalloway speak at the Bay Area User Group on Tuesday night, and met up with ASPAlliance columnist Steve Sharrock there for the first time as well.  We had dinner the next night, and he mentioned something he had used for a solution for a client that I was unaware of.

  • ASP.NET Cookbook

    The ASP.NET Cookbook is finally 100% complete and submitted to the publisher, SAMS (as of 2/26/03).  This has been quite an undertaking, and having completed the longest and hardest phase of the book writing process (author review remains, but is not nearly as arduous), I must once again say that I never want to write another book.  Of course, I said that after writing ASP.NET By Example, too...  So what changed my mind last time?  Well, it's a bit of a story.

  • Idiots at the Mic - More news from the MVP Summit

    Since I'm in a foul mood and I am procrastinating finishing my book, I just thought I'd write a quick note to express my disapproval for the MVPs at last week's summit who thought that the opportunity to ask questions of Microsoft executives was actually an opportunity for them to look impressive (or perhaps just stupid) to their peers.  The first such idiot, who was a frequent attendant to the mic, thought it would impress his friends to quiz Bill Gates on whether or not he could remember this guy's name from the last summit.  As if Mr. Gates has nothing more important to remember - quit wasting his time.  I don't even remember what this guy asked because, like everyone else in the audience, I was stunned that someone could be such an ass.  Other MVPs (whom I won't call names because they were civil) championed personal crusades for VB6 and Windows 98 at every opportunity to voice a question, which was ok the first time, but grew old over the course of the day.  Finally, the MVP who asked Steve Ballmer a question about how Microsoft would improve its image on the security front, and who received a ten minute long answer in return that went into great detail, should have said "Thank you" and sat down.  Instead, he had the gall to say "I'm not satisfied with your answer."  I think Mr. Ballmer more than answered the question, especially considering the time constraints he was working under, and at any rate I thought it was pretty rude to disregard everything he had just said like that.

  • Blogs R Kewl

    I just thought I'd write something quick to tell Scott Watermasysk that he has a pretty cool thing going here with these blogs.  Having thus buttered him up, I thought I'd also rant a bit about the fact that even though I tell the login to remember me, it doesn't, and that there is thus no way for me to find the link to the Admin section for my blog except to remember it and type in the URL.  When can we expect these trivial problems to be fixed, Scott, hmmmm?  :)

  • MVP Summit Aftermath

    I had a good time at the MVP Summit last week; it was my first.  I have some pictures to upload but they're still on my camera at the moment.  However, I wanted to reference a few other folks' pics now before I lose the URLs, and I'll come back and edit this later to add my own.

  • Regular Expressions

    Regular expressions are very powerful, and are one of my favorite tools to use because they are so flexible and they can be used regardless of whether one is a .NET developer or a Unix shell scripter or a Java developer or whatever.  As I started getting into regular expressions for validation controls, I noticed that there wasn't any online library for these expressions, which of course meant that a lot of people were reinventing the wheel.  How many times do different people need to come up with the same (or very close) expression for an email address or a ZIP code, for crying out loud?  So I used this problem to test out my then-novice ASP.NET skills and created an online regular expression library, RegExLib.com.

  • First Post!

    This would be my obligatory first post to Scottw's awesome new DotNetWebLogs site!  I hope to return and add more content once I finish up my *$#&#@# second ASP.NET book.  By the way, if you ever hear me say that I'm writing another ASP.NET book, smack some sense into me.  Please.  :)