when calling following code:
string filePath = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
Uri u = new Uri(filePath);
string filename = u.GetComponents(UriComponents.Path, UriFormat.SafeUnescaped);
string path = u.LocalPath;
the uri object returns only fragment of whole path to file, by splitting path somewhere in the middle ;-(
tested on .NET 2.0, .NET3.5