Friday, March 12, 2010

.NET Framework Bug in SmtpClient.Send()…

An interesting support case came up recently involving one of the staples of SQL Sentry Event Manager functionality – SMTP support. The basic problem was that all email actions were failing reporting “GeneralFailure”, which is kind of the catch-all for SMTP communication errors. It can often be very difficult to troubleshoot. In a lot of cases it actually requires gathering logs from the SMTP server itself.

In order for SQL Sentry to send notifications via email certain settings are required such as the SMTP Server, the “from” email address and, if necessary, security credentials for the SMTP server. In this case, we were able to send a test email using the simple test from the SQL Sentry console application’s settings tab. This let me know that the SMTP server was working, so I needed to look deeper into what was going on in the software as opposed to what was going on at the SMTP server.

I found a nice article online (here) pointing out that I could enable a trace listener for System.Net.Sockets which would log detailed information about the SMTP conversation with the server. This trace revealed a nasty NullReferenceException that was being thrown every time the SQL Sentry server service tried to call the Send method on SmtpClient.

After some quality time with Bing.com I found this Microsoft Connect record:
http://connect.microsoft.com/VisualStudio/feedback/details/361506/smtpclient-throws-nullreferenceexception-if-password-is-blank

Apparently, if you provide a login, but no password, SmtpClient.Send() will not be your friend (prior to .NET 4.0). This turned out to be the problem. Luckily, with a little testing, we discovered that this SMTP server didn’t really need to have credentials provided at all (not from the inside anyway). Simply removing the login got everything rolling again.

What we learn here is just that our impatience for .NET 4.0 is that much more justified. Thank goodness Brooke Philpott is already working toward targeting .NET 4.0 with SQL Sentry. I’ll save the details on that for him though. ;o)

Until next time,

-Jason R. Hall

Monday, March 8, 2010

Some Moments Captured in Time at SQL Saturday #33 in Charlotte, NC

Some nice photos came out of SQL Saturday #33 thanks to Ken Teeter from SQL Sentry. I just wanted to take a moment and comment on a few of them. Everyone keep in mind that it’s all in good fun please :)

First we have Motley Crew(L-R: Andy Warren, Steve Jones, Rushabh Mehta, Peter Shire) back on tour, though I’m not sure where to buy tickets:

I think someone just sank Steve Wright’s battleship:

If Mike Walsh ever tells you he can deliver a training session in his sleep, believe it:

This image of Andrew Kelly is OUTSTANDING! (Semper Fi):

Patient-Zero located and identified as Tim Ford. Please inform the CDC:

Aaron Nelson raising his hand to ask the audience a question. Doesn’t that work the other way around Aaron?

Notice how all the other speakers are standing except for Brett Tomson? Slacker…. The guilt is written all over his face:

Karen Gonzalez, Missy Kelly and Peter Shire share a rare moment of peace early on in the day. Thanks for all your hard work!

Again, this is all in fun. I hope everyone enjoyed the event and made it home safely. Until next time,

-Jason R. Hall

Sunday, March 7, 2010

SQL Saturday #33 (Charlotte, NC)

Saturday, March 6th marked the completion of the event all of us at SQL Sentry had been greatly anticipating. I presented “Things Your Mom Never Told You About SSMS” for the second time ever (first at the Raleigh, NC SSUG). I followed directly behind Aaron Bertrand who presented on a similar topic. That really turned out to be great for a couple of reasons. First, Aaron is a popular speaker, and I got a lot of the overflow crowd that weren’t able to make it into the room for his session. Second, there really wasn’t much overlap at all between the two sessions. In fact, I would even go so far as to say that a lot of my topics were building off of topics Aaron brought up in his session. It was almost synergetic without having ever planned it to be. All in all it was a great experience for me being new to speaking, and I had a great crowd that understood a little Power Point fumbling and also had a lot to contribute. Anyone interested can find the materials here including some things I had to leave out due to time constraints. I will be delivering this session once more at SQL Saturday, Richmond VA on April 10.

The entire SQL Saturday #33 experience was wonderful. For me, the chance to put faces with names for people that often provide invaluable feedback for SQL Sentry products was great. Some names that are close to mind right this moment are Tim Ford, Aaron Nelson and Mike Walsh. It was also a treat to reunite with some long time friends like Ashton Hobbs and Brett Tomson with whom I have a long history. This social opportunity, combined with all of the technical knowledge gained by attending sessions delivered by these same folks made it an epic win in my book. I fully look forward to seeing these folks and many others at more events in the future.

It was quite a hectic day for all of us at SQL Sentry, and the lead up to it was no exception, but there are a few people that I really want to point out for the effort put into making this happen. Greg and Karen Gonzalez, Missy Kelly and Peter Shire all put in a massive effort to make this happen in the weeks leading up to the event. I know there are others that should be mentioned, but these folks really stood out to me, and I want to offer my thanks. I hope they all enjoyed it as much as I did.