. Advertisement .
..3..
. Advertisement .
..4..
As the tittle says, I get this error ”invalid uri: the format of the uri could not be determined.” when I run my code:
Uri uri = new Uri(slct.Text);
if (DeleteFileOnServer(uri))
{
nn.BalloonTipText = slct.Text + " has been deleted.";
nn.ShowBalloonTip(30);
}
I don’t know why this error occurs and how to solve it. Can someone help me?
The cause: This problem arises when the input value is different from what the application was expecting. In other words, the program received a value that was not in URI format when it was expecting a valid URI.
Solution: You can fix this error by using UriBuilder instead.