March 2007 - Posts
As I was just starting to get into a regular blogging routine, I became involved with a contract that has evolved into a rather intense development schedule. As such, there really hasn't been any time for blogging over the last couple of weeks. My schedule should start to stabilize by the middle of next week. So, expect to see quite a few posts start to churn out around that time.
I haven't really blogged about VSTO (Visual Studio Tools For Office), but I have thought of a few good topics over the last week or so. Over the last several months, I learned a lot about VSTO to help fill in some resource gaps for a product Softech is currently developing. As a side effect, it has landed me in a few contracts dealing with the technology. Even though it isn't my preferred technological domain, the potential for what can be achieved using VSTO is pretty cool. In the future, I will probably mix in some intermittent posts about it.
I also have two or three good articles in mind for WCF. Hopefully, I will be able to get one of those out within the next couple weeks. Regardless, I will definitely resume posts on WCF in the very near future.
Stay tuned.
For the last couple of years, I have been using RSSBandit for my RSS aggregator. I tried quite a few different applications, but I just didn't like them in comparison to RSSBandit. I really like the ability to persist my state to an FTP location for synchronizing on different machines. So, you may be wondering why not use one of the online aggregators, such as Google Reader? Well, a lot of people prefer to use the online aggregators, but I never was that crazy about those either. I like being able to download the content for reading offline (on a flight, etc). Each person has their own particular tastes and mine happens to be RSSBandit.
However, many fans of RSSBandit began to shy away from it once Vista was released. There were compatibility issues that effectively rendered it useless. Since I haven't completely made the jump to Vista, it hasn't been a problem for me, but a lot of folks have tossed RSSBandit out the door because of this.
Alas, the problem is no more!
A new version has been released. It is actually the first update since December 2005. There have been a variety of new features added as well as bug fixes...most notably the compatibility issues with Vista. You can get the latest version here: http://downloads.sourceforge.net/rssbandit/RssBandit1.5.0.10-installer.zip.
Below is a complete list of new features and major bug fixes copied from the project site.
New Features
- Comment Watching
- Items marked as read when viewed in the Newspaper
- Date-based grouping in the list view
- Options for opening tabs in the background
- Favicons
- Enclosures treated as attachments
- Certain user defined enclosures treated as podcasts including adding to playlists in iTunes and Windows media player
- Remembering application state on restart - This will work similar to the Session Saver extension in Firefox in that open tabs and the tree view state will be remembered on restart
- Revamping the search feature - We've moved the implementation of feed search to Lucene.Net from our custom feed search implementation which should make searches faster and provide richer search options. The syntax for performing Lucene search queries is available at http://lucene.apache.org/java/docs/queryparsersyntax.html.
- Support for Atom Threading Extensions
- Easily configurable keyboard shortcuts - Just right-click when hovering over the toolbar menu and choose "Customize". This feature came as a freebie from switching to Infragistics NetAdvantage for some of our UI components.
Major Bug Fixes
- Feed items appear in wrong feed folders - we now apply a set of heuristics to prevent this problem from surfacing ever again. I'm pretty sure this problem is due to bugs in HTTP Pipelining. However it is unclear whether the bugs are in the .NET Frameworks HTTP library, proxy servers that RSS Bandit is passing through or the Web servers that the application is fetching feeds from.
- Relative Links in Atom 1.0 feeds appear incorrectly - now that this is fixed the links Tim Bray and Sam Ruby's feeds now work correctly
- Atom feeds from the Blogger beta site show no posts when viewed in RSS Bandit - this was just a dumb bug on my part.
- Sites with malformed cookies cause feeds not to be fetched - Specifically, fetching cookies from sites such as Windows Live Spaces results in the "An error has occurred when parsing Cookie header". Now we just ignore the error and soldier on.
- RSS Bandit needs administrator privileges on first run - the fix for this was so esoteric it boggles my mind.
- RSS Bandit stops downloading feeds after a while - This was actually two bugs. The first was that the application stopped automatically downloading feeds if any of them timed out while being fetched. The other was that feeds with whitespace in the URLs were not being updated.
- Application doesn't work in Windows Vista - this has been tracked down to our use of old versions of the Divelement controls. Although these issues have been fixed in newer versions of the Divelement controls we have decided to move to NetAdvantage for Windows Forms controls for unrelated reasons. The new controls should work fine in Windows Vista.
- Application crashes with NullReferenceException during Web browsing - this is another issue which should be fixed with our move to the NetAdvantage for Windows Forms controls.
The next Alabama Code Camp has been scheduled for Saturday, April 14th in Mobile, AL. The organizers are still working out some of the logistics. Within the next week or two, the official location will be announced. If it is anything like the previous events, it should be a great opportunity for networking with other developers in the community and learning about some cool technologies.
The call for speakers is currently open. If you (or someone you know) are interested in presenting, go to the site to download the speaker form. As usual, the site will be updated as speakers and sessions become known. Registration will probably open a week or so before the event. Keep an eye on the site for updates. I'll be sure to send out a reminder as well.
Check the site http://www.alabamacodecamp.com for additional information.
I stumbled across a cool site today via Community Credit: http://www.email2face.com.
Basically, this site allows you to upload a photo that gets associated to your email address. In doing so, people that communicate with you a lot via email can use the site to search for your photo via email address. It is a pretty cool concept. I can't believe I never heard about the site considering it was launched around a year ago.
The process is quite simple. Upload a photo for your email address. In order to create the best looking image possible, be sure it is sized to 200 pixels wide. Otherwise, their upload process will automatically resize it, which could potentially reduce the image quality. After the image is uploaded, you will receive an email with a link to verify the image.
If this sounds interesting to you, go check it out.
Message logging is a valuable diagnostic function built into WCF. It provides a mechanism to record and view the actual messages exchanged between a service and clients. This can be rather useful when you have a need to get a look at the physical messages. It should be emphasized that message logging can be enabled on the client and/or the service.
Let's take a look at some of the basics.
First, the service configuration must be modified to enable message logging. This can be done rather easily via the WCF Configuration Editor. Refer to my previous post for the specifics on how to enable diagnostics. The most interesting part of the configuration for message logging is shown below:
There are several options available for tweaking the manner in which messages are logged. Here are a few examples:
- Log the entire message or only the header
- Log at the transport level (on the wire)
- Log at the service level (before message is written to/read from the wire)
If you want to capture the unencrypted values in a message, you should log at the service level. Depending upon your transport and various settings within the binding, messages logged at the transport level wire may be encrypted or otherwise unreadable.
Once the service has been configured appropriately, invoke a few operations from a client to record the exchanged messages within the log file. After the log file has been created, the Service Trace Viewer can be used to examine the results. This handy little gem is one of my favorite WCF utilities. It is included with the Windows SDK for Vista and .NET Framework 3.0 Runtime Components (what a mouthful). It is installed to the following path:
<Root Drive>\Program Files\Microsoft SDKs\Windows\v6.0\Bin\ServiceTraceViewer.exe
It is also accessible via the Start Menu:
Start -> All Programs -> Microsoft Windows SDK -> Tools -> Service Trace Viewer
Personally, I have added the utility to my Visual Studio Tools menu. This makes it very easy to navigate to the application when working within VS. To include it in your Tools menu, navigate to Tools -> External Tools and configure a menu entry accordingly.

As shown in the image, the Service Trace Viewer provides a nice GUI to read the contents of the message log. Notice the grid that displays each message recorded in the log. When you click on an individual message, the message content is displayed in three different tab views: Formatted, Xml, and Message.
The formatted view is shown in the above image. It essentially breaks down all of the message content into categories that allow for easier reading via the user interface. The message in the sceenshot was logged at the transport level using a BasicHttpBinding. Note the General Message Information section displays the Http headers included with the message. The Envelope Information section displays the actual Soap headers, method, and parameters.
The Xml tab displays the entire xml node for the specific message in the log file.

The Message tab displays the raw xml for the actual service message. If you are logging at the transport level, it will contain transport-specific xml that precedes the Soap Envelope.

Another feature worth mentioning is the ability to search through the message log for specific text, which can be limited to specific fields within the log. This functionality can be found in the toolbars just below the menu.
This really just scratches the surface in terms of the Service Trace Viewer capabilities. However, this should give you an idea of what it can do. I highly recommend experimenting with various diagnostic configurations and examining the output in the Service Trace Viewer. Every WCF developer should possess a basic understanding of it.
Over the course of the last few weeks, there has been a marked increase in spammers. Specifically, blog comments and trackbacks have been the primary offenders. It appears as though spammers have gotten bored or my traffic has increased just enough to make me an interesting target. Or, maybe it just pissed them off when I started blocking their IP ranges (typically in China, South Korea, etc). Regardless, I really hate these guys.
To combat the nuisance, I have disabled user registration since several spammers figured out they could register and have immediate access for publishing comments/trackbacks. In addition, I have enabled Community Server spam scoring. I'm not really sure why I didn't set it up in the first place. It was one of those situations where I didn't want bother with it initially because I felt it was unnecessary. For the last year or so, it wasn't. But, things change.
With the current spam score configuration, I think it will alleviate a large majority of the problem. However, as is the case with any scoring system, there is always the potential for false positives.
At some point in the development cycle, the inevitable necessity of debugging your application will arise. For WCF services, special support is available for capturing diagnostic data concerning your service and its exchanging of messages with clients. There is a handy utility that ships with the Windows SDK for Vista and .NET Framework 3.0 for viewing the diagnostic output. It is known as the Service Trace Viewer.
Before you can view the diagnostic output in the viewer, the service must be configured to capture the diagnostic data. This is accomplished by making some entries in your service configuration file. Personally, I prefer to take the easy approach and use the Service Configuration Editor.
Once your service configuration has been loaded into the editor, select the Diagnostics folder. You will find there are a few different types of diagnostics ranging from performance counters to logging. I recommend playing around with all of them to get a feel for what they can do. However, I am going to focus on message logging and tracing over the next couple of blog posts.
Notice there is a link to enable each type of diagnostic. It doesn't get much simpler than that. With a single click, your diagnostic of choice can be turned on or off. When enabling message logging and/or tracing, the configuration editor handles setting up the listener for receiving diagnostics and the source used to store the output. There are quite a few settings available for each one. For example, message logging can be configured to record messages at the transport level (as they appear on the wire) or the service level (prior to packaging for transport). For tracing, it is possible to set options such as the trace level for controlling the amount of information that is captured.
Be sure to take a look at your app.config before and after saving the configuration changes. It should be rather obvious how much xml the editor saves your from writing by hand.
Later this week, I will go over some of the capabilities of the Service Trace Viewer by examining some diagnostic output from a service.
I noticed that Keith Elder discovered a quiz to determine his programmer personality. It seems the creator of the test came up with a Myers-Briggs variation specific to programmers. These type of tests are always entertaining to me. Naturally, I had to give it a try.
You can take the test here: http://www.doolwind.com/index.php?page=11
Here are my results:
DHSB
You're a Doer.
You are very quick at getting tasks done. You believe the outcome is the most important part of a task and the faster you can reach that outcome the better. After all, time is money.
You like coding at a High level.
The world is made up of objects and components, you should create your programs in the same way.
You work best in a Solo situation.
The best way to program is by yourself. There's no communication problems, you know every part of the code allowing you to write the best programs possible.
You are a liBeral programmer.
Programming is a complex task and you should use white space and comments as freely as possible to help simplify the task. We're not writing on paper anymore so we can take up as much room as we need.
Disclaimer:The opinions and views expressed within this blog are solely my own and do not represent those of my employer or anyone else.