الكود البسيط دة
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
try
{
WebClient wc = new WebClient();
Uri MyUri = new Uri("http://localhost");
StreamReader sr = new StreamReader(wc.OpenRead(MyUri));
string str = sr.ReadToEnd();
Console.Write(str);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}مش راضي يشتغل, كل مرة بدي WebException
Unable to connect to the remote server
ياريت لو حد يعرف الخطأ دة مصدرة ايه؟
