Everything worked fine on my detector computer and dandy, but when I tested the program on another computer running Windows7, I got System.UriFormatException: Invalid URI: there is an invalid sequence in the line. In the following code:Uri.UnescapeDataString(section);
At first, I thought that the second computer was receiving different data from dev pc, so I copied the html line that did not get into the file and reduced the code to this:
static void Err(string s){}
private static void GetValue()
{
try
{
var html = File.ReadAllText("ld.txt");
var section = Regex.Match(
html,
"etc_etc(.*): ",
RegexOptions.Singleline)
.Groups[1].ToString();
Uri.UnescapeDataString(section);
}
catch (Exception ex)
{
Err(ex.ToString());
}
}
Works great on dev, but the second computer gets an exception again. They both download the same html from the same file ld.txt, and then do the same with it .. and both computers are x64 Win7. What gives?
natli source
share