i have to reach a web site content which have an url like that :
90.245.10.221/page.php
When i try to run this code in ASP.NET:
WebRequest objRequest = HttpWebRequest.Create(url);
objResponse = objRequest.GetResponse();
I have an error message like that:
System.UriFormatException: Format of the URI could not be determined.
I think this url has a static IP. How can i fix this problem?
You need to put the protocol string in front of it, in this case I assume it’s http://, so you would have your URL as http://90.245.10.221/page.php.
There is more information available on MSDN as to possible issues with Uri construction