Hey Guys,
I have the following code snippet which was found on a ASP tutorial site. It doesn't seem to work:
Uri printerIP = new Uri("http://10.4.82.121/");
if (printerIP.Scheme = Uri.UriSchemeHttp)
{
HttpWebRequest printerDataRequest = HttpWebRequest.Create(printerIP);
printerDataRequest.Method = WebRequestMethods.Http.Get;
HttpWebResponse response = printerDataRequest.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
string tmp = reader.ReadToEnd();
response.Close();
Response.Write(tmp);
}
I get the following errors:
E:\PrinterCrawler\Default.aspx.cs(19,13): error CS0200: Property or indexer 'System.Uri.Scheme' cannot be assigned to -- it is read only
E:\PrinterCrawler\Default.aspx.cs(19,13): error CS0029 ...
Go to the complete details ...