It looks like you put the wrong URL. You can check it out on
Uri.IsWellFormedUriString
One reason is that you put a string with national characters.
In this case, the answers do not solve the problem before, because you must also encode the URL.
You can use System.Web.HttpUtility.UrlEncode for it, and then apply the described solution before X Enterprises (but you should not replace spaces - this would already be done by encoding).
But the easiest way to get the correct url is
string url = new Uri(pathToFile, UriKind.Absolute).AbsoluteUri;
Gareev kamil
source share