Get Absolute Url For Local File
using System; using System.IO; namespace AgUnit.Runner.Common.Infrastructure.Util { public static class UriHelper { public static Uri GetAbsoluteUrlForLocalFile(string path) { var fileUri = new Uri(path, UriKind.RelativeOrAbsolute); if (fileUri.IsAbsoluteUri) { return fileUri; } else { var baseUri = new Uri(Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar); return new Uri(baseUri, fileUri); } } } }