내가 구글 페이지 모두 확인 을 시작 얻을 때 웹, 에서 페이지를 얻기 위해 웹 클라이언트를 사용 오전하지만 난 VK API를 웹 클라이언트의 반환 레르에서 페이지를 얻을 때 찾을 수없는,하지만 브라우저가 정상 내 코드 페이지를 엽니 다윈도우 폰 웹 클라이언트
private void log_Click(object sender, RoutedEventArgs e)
{
string auth;
string login = Uri.EscapeUriString(this.login.Text);
string password = Uri.EscapeUriString(this.pass.Password);
auth = "https://api.vk.com/oauth/token";
auth += "?grant_type=password" + "&client_id=id&client_secret=code&username=" + login + "&password=" + password + "&scope=notify,friends,messages";
//auth = "https://google.com/";
WebClient client = new WebClient();
client.DownloadStringCompleted +=new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
Uri.EscapeUriString(auth);
client.DownloadStringAsync(new Uri(auth));
}
void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Error == null)
MessageBox.Show("Using WebClient: " + e.Result);
else
MessageBox.Show(e.Error.Message);
}
때때로 문제를해야합니다 유효하지 않은 인증서가있는 서버에 https 연결이 설정되었습니다. –