+1  A: 

Your code will call System.IO.Path.CheckInvalidPathChars, which in turn checks for the the following:

  1. double quote (")

  2. left angle bracket (<)

  3. right angle bracket (>)

  4. veritical bar (|)

and for control characters less than 32 decimal (space).

So Make sure your path doesn't contain them.

Ngu Soon Hui
Sorry I'm not sure where System.IO.Path.CheckInvalidPathChars is. Where would I locate this?
Ben
You will locate this inside the `System.IO.Path` namespace, the important thing is to make sure that your path doesn't contain the above characters.
Ngu Soon Hui
You need to import the `System.IO` namespace before using the `Path` class (no need for referencing any dll as it is declared in mscorlib)
Yogesh
@Ngu: Path is a class, not a namespace.
Yogesh
@Yogesh, you are right... my typo
Ngu Soon Hui
A: 

Nice Stacktrace, but the invalid path would be more helpful.

In my oponion, the path provided to OpenBay.Utils.XPathUtils.GetNodes(string, string) has some invalid arguments. Use System.IO.Path.CheckInvalidPathChars() to check which characters are invalid and maybe contained in the argument provided to the method above.

Jehof
Sorry the path is just the domain root we haven't changed anything on the site for a long while so this is out of the blue. Where is Use System.IO.Path.CheckInvalidPathChars() located?
Ben