Aight, 응답이없는 일부 게시물로 리디렉션됩니다. 나는 AUTO UPDATER라는 프로그램을 만들고 있다고 말하고 싶다. 그리고 그것이 작동하는 방법은 1.0.0.0을보고 다음 1.0.0.1을 업데이트하면됩니다.GhostBin 예외 : 원격 서버에서 오류를 반환했습니다. (406) 사용할 수 없음
그래서 Ghostbin 사이트에서 텍스트를 변경할 수있는 사이트에 연결하여 코드에 연결했습니다. 그것은이 오류를 내게 주었다. 나는 그것을 고치는 법을 모른다.
Exception: The remote server returned an error: (406) Not Acceptable
여기 내 코드입니다.
private void button1_Click(object sender, EventArgs e)
{
if (!new WebClient().DownloadString("https://ghostbin.com/paste/odmbf")
.Contains("1.0.0.0"))
{
MessageBox.Show("You are running the latest version!", "No Update",
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
if (MessageBox.Show("New Update! Would you like to update?", "Yay!",
MessageBoxButtons.YesNo, MessageBoxIcon.Information) ==
System.Windows.Forms.DialogResult.Yes)
{
Process.Start("...");
}
}
}
당신이 할 헤더 ... – nozzleman
을 추가 라인을 주석하려고 사용하여 브라우저로 표시합니다. 수정 없음 : 0 – RockyBoa
헤더가'client'에 추가 된 것을 보았습니까?'WebClient'는'wc'입니까? 프로그램이 올바른 인스턴스 ('wc')에 헤더를 추가합니까? –