1Password from AgileBits

Just a quick recommendation – if you’d like to have a multiple-family member licensed, password management application that works in Windows and OS X, you might want to try 1Password from AgileBits.

image

Through the end of November 2011, they’re offering a 50% off sale, which makes their software a significantly better value than normal.image

The software is updated frequently, they respond on twitter quickly, … a great little company based in Canada.

I’ve hooked the application’s password store to my DropBox account for easy multiple-machine and OS synchronization.

It includes a slick extension for Chrome to make saving and using logins pain free.

There are six standard types of secured information it can store:

image

Notes is sort of the “catch all.”

The only thing that bothers me is how nice the OSX version looks and how antiquated the Windows version is. On Twitter, I referred to it as “being hit by an ugly stick.”

It’s a shame too – Windows applications don’t need to look like a bad version of the Windows File Explorer. Sad smile It baffles me as to why it doesn’t look more like the Mac version. From a quick exploration of the way the EXE was built – (hey, remember where you’re reading this) it looks like they may have used Delphi! I know Delphi can do better than this – I was writing Delphi 1 applications that used background texturing, 256 bit color (yes, yes, that was actually a big deal back in the day), fancy rounded buttons… (yeah yeah, I know).

image

You can add attachments to the various accounts and notes:

image

They also have an interesting feature where you can access your secure logins anywhere (as long as the files are available on the web) with a little bit of setup. It’s called 1PasswordAnywhere.

In any case, it’s a slick program as features go. It’s a bit geeky in functionality for the Windows version, but no more so than KeePass, the application I’m replacing.

SNAGHTML4dc4f5

Recommended.

Windows Home Server 2011 & “the server appears to be offline” when trying to connect to the LaunchPad

Within the past few days–maybe after a recent Windows Update–one of my laptops started to fail to successfully connect to the WHS 2011 server I’ve got in my home. The error was “the server appears to be offline” and asked if I’d instead want to connect off-line. (Yeah, no thanks.)

A bit of hunting on the Internet later – no one had a clear path to success. Most reported continual failures when trying to start the LaunchPad or start a backup manually.

I had success by doing the following:

  1. Start > View Local Services (you can type “services” for a quick match)
  2. Find Windows Server Health Service and start it if it isn’t already started.
  3. Find Windows Server Client Computer Backup Provider Service and start it if it isn’t already started.

image

image

image

Neither of these were running on my laptop even though they both were set to Automatic startup. As soon as I started them manually, the LaunchPad immediately began working, and manual backup became available again.

There were no errors in the Windows Event Viewer explaining why they may have failed to start. As I don’t reboot my laptop frequently, this fix will remain in place for a while (and I’ll need to remember to check these in the future potentially).

Hope this helps someone else.

Sending an email using SMTP in .NET 4.0

I had need of sending embedded images within an e-mail. .NET has had a few handy classes for sending an email using SMTP for a few versions. While there were a few examples floating around the internet, none were as clean and easy to follow as I expected. So, I decided to create a simple sample application in C# which demonstrates how to embed an image (or other content) in a email that contains both plain text and HTML content. It’s really not difficult. A number of examples ignore the fact that almost all of the objects need to be disposed, so I corrected that. This code is intentionally written synchronously to keep the sample simpler and easier to follow (and I didn’t need asynchronous sending for my learning exercise).

image

Above is the output (if you happen to have a picture of NYC). The example code uses Gmail as the SMTP host (it has the settings that generally work for gmail in most situations, including using SSL).

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Mail;
using System.Net;
using System.Net.Mime;

namespace TestEmailAttachments
{
    public class EmailSettings
    {
        public string ToAddress { get; set; }
        public string FromAddress { get; set; }
        public string AccountName { get; set; }
        public string AccountPassword { get; set; }
    }

    class Program
    {
        static void Main(string[] args)
        {
            EmailSettings settings = new EmailSettings()
            {
                ToAddress = "sample@example.com",
                FromAddress = "sender@example.com",
                AccountName = "sample@example.com",
                AccountPassword = "mypa$$w0rd$ux"
            };
            SendEmail(settings);
            Console.WriteLine("Done");
            Console.ReadKey();
        }


        static void SendEmail(EmailSettings settings)
        {
            if (settings == null) { throw new ArgumentNullException("need settings!");  }
            // Almost everything used my the mail system is disposable
            // so, we'll use 'using' liberally
            using (MailMessage mail = new MailMessage())
            {
                //set the e-mail address
                mail.From = new MailAddress(settings.FromAddress);
                mail.To.Add(settings.ToAddress);

                //set the subject
                mail.Subject = "New York City!";

                // create some content
                string textPlain = "I'm sorry, but you won't see the pretty photos inline. Look for an attachment.";
                string textHtml = "Here is an embedded image.<img src=cid:NewYorkCity1>";

                // setup the alternate views (so different type of e-mail clients can see the content)
                using (AlternateView 
                        plainView = AlternateView.CreateAlternateViewFromString(textPlain, null, 
                            MediaTypeNames.Text.Plain), 
                        htmlView = AlternateView.CreateAlternateViewFromString(textHtml, null, 
                            MediaTypeNames.Text.Html) )
                {
                    //create the LinkedResource (embedded image)
                    using (LinkedResource photo = 
                        new LinkedResource(@"D:\Temp\nyc2009\NewYorkCity (1 of 1).jpg"))
                    {
                        // the content id here must match the content id used in the html as the 'cid:NNNNNNNN'
                        photo.ContentId = "NewYorkCity1";
                        // set the content type to match the image (in this case, it's a jpeg)
                        photo.ContentType = new ContentType(MediaTypeNames.Image.Jpeg) 
                            { Name = "NewYorkCity (1 of 1).jpg" };

                        // the htmlView needs the resource
                        htmlView.LinkedResources.Add(photo);

                        // add each view to the alternate views collection
                        mail.AlternateViews.Add(plainView);
                        mail.AlternateViews.Add(htmlView);

                        // send the message, again diposable
                        using (SmtpClient smtp = new SmtpClient())
                        {
                            // these are gmail settings... you'll need to adjust them as needed
                            smtp.EnableSsl = true;
                            smtp.Host = "smtp.gmail.com";
                            smtp.Port = 587;
                            smtp.UseDefaultCredentials = false;
                            smtp.Credentials = new NetworkCredential(settings.AccountName, 
                                settings.AccountPassword);
                            smtp.Send(mail);
                        }
                    }
                }                                
            }
        }
    }
}

Use this only for good. Smile

Setup for the Asante VoyagerIP Cameras: Wireless Woes

I recently purchased two new IP cameras from Amazon. The Asante Voyager I and Asante Voyager II. They’re both good cameras with lots of bells and whistles, and a decent amount of configuration options that should satisfy both the geeks and a non-geek.

The reason I’m posting this is to potentially help any other new users of these cameras that may be having a similar problem.

Setup was very simple, until a snag with wifi setup.

To begin, you’ll plug-in the device to an Ethernet jack (yes, you’ll need one of those!)

There’s a utility shipped on the included disk or available for download to help discover the IP address of the camera. It’s ugly as sin (or maybe uglier?), but effective (or you can use your router if you’d like to find the camera):

SNAGHTML2a1768ec

(As I’ve already got the camera up, you’ll see something slightly different)

A double click on the corresponding camera launches the default web browser to the address of the camera. You’ll need the default username and password to access the web site which is provided in the documentation. If you’re running IE, it will prompt to install an ActiveX control that provides a much more “live” experience than you’ll get if you go with the QuickTime option (which is what other browsers seem to use by default). I hate ActiveX control installs like this, but this one really does make the experience better.

image

(The shot above is of our kitchen, it’s quite dark and the camera is in “night” mode with IR illumination. You’d not be able to identify a stranger in the image, but you could make out a person or a pet easily enough).

Next, to the network link:

image

Next, I clicked on wireless in the left side:

image

After a few moments, the list of wireless access points is displayed in the top. I selected one of the options and the SSID field is automatically filled in below.

Click [Next Step].

Here’s where the major frustration occurred. The authentication settings.

image

After spending SEVERAL hours experimenting and grumbling a LOT in my den, I gave up. I could not get it to work. After countless failures with our household wireless access points (we’ve got 3), I dug out my old Apple Airport Express so that I could try lots of things without messing up all of the wireless devices in the house.

Failures. I rebooted that Airport Express about 4 gagillion times.

I wrote support at Asante and for the most part, they did try very hard to help (and quite rapidly). They tried to replicate what I was experiencing, but couldn’t seem to duplicate the problem my setup was experiencing: “can not connect.” It was very frustrating. (Hey, and they even called and stayed late to help! Thanks Roger!)

Without encryption, things worked fine, but with it on, nothing repeatable.

Here’s what I learned:

Because of the crappy way that the web page transmits the password from the web browser to the device, don’t expect symbols to work with only a few exceptions: ! works, * probably works, and a few others. I lost a number of hours to that issue before I spelunked and debugged my way through the JavaScript code to discover what it was not doing with my password that I had expected (encoding it). So, stick with alphanumerics and a few basic symbols and you should be OK. Do not use colon, ampersand, slash, backslash, percent, @, … and probably more. Furthermore, passwords of great length (> 16?) may not work. That I can’t explain, but it happened to me that they did not work even with only letters.

Also, if you’ve got a wireless access device that supports WPA/WPA2 Personal …

image

Be sure to use WPA-PSK and TKIP. You’ll likely have MUCH greater success. I could not get WPA2 to work, period.

image

With the changes above:

  1. Password for wifi network simplified
  2. WPA and TKIP

Everything works like a charm. Both cameras are now setup and being monitored (I’m still using Blue Iris, which I’d highly recommend – it works really well (I’ve got it running on Windows Home Server 2011, has lots of great features and should be priced at least twice what he’s asking!).

Note that this camera is also manufactured as several other labels:

They all use the same firmware, so problems with one are likely to happen on others.

If you have any questions about the device that aren’t answered on the manufacturer’s web pages, please post a comment and I’ll see if I can help!