Belirli bir web sayfasının html kodunu almaya çalışıyorum, Doğru bir kullanıcı adı ve şifrem var ama hala işe yaramayacağım, Uzak sunucu bir hata verdi: (401) Yetkisiz
:String htmlCode = client.DownloadString("http://cdrs.globalpopsvoip.com/0000069/20091229/20091228_20091228.CDR");
istisna almak:
private void buttondownloadfile_Click(object sender, EventArgs e)
{
NetworkCredentials nc = new NetworkCredentials("?", "?", "http://cdrs.globalpopsvoip.com/0000069/20091229/20091228_20091228.CDR");
WebClient client = new WebClient();
client.Credentials = nc;
String htmlCode = client.DownloadString("http://cdrs.globalpopsvoip.com/0000069/20091229/20091228_20091228.CDR");
MessageBox.Show(htmlCode);
}
MessageBox sadece sorun bu çizgiye olsun her zaman yani test etmektir: bu benim kodudur
The remote server returned an error: (401) Unauthorized.
Bunu nasıl düzeltirim?
Teşekkürler bu işe yaradı –