By the way, more universal and correct method of the executable directory is this:
string location = System.Reflection.Assembly.GetEntryAssembly().Location;
string executableDirectory = System.IO.Path.GetDirectoryName(location);
I don't think it will eliminate the exception, but this method works when other methods give incorrect results (for example, when application hosting is different).
As to your problem, please see my question in the comments to your question and answer it.
—SA