C# DownloadStringAsync不适用于.NETC中的Github URL

C# DownloadStringAsync不适用于.NETC中的Github URL,c#,.net,url,https,download,C#,.net,Url,Https,Download,我可以使用DownloadStringAsync获取一些URL,但不能获取其他URL Uri uri = new Uri("https://raw.githubusercontent.com:443/krisives/GRemote/master/VERSION.txt"); client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStrin

我可以使用DownloadStringAsync获取一些URL,但不能获取其他URL

        Uri uri = new Uri("https://raw.githubusercontent.com:443/krisives/GRemote/master/VERSION.txt");

        client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
        client.DownloadStringAsync(uri);

    }

    void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
    {
        String version = e.Result.Trim();
        Console.WriteLine(version);
        if (version != GRemoteDialog.Version)
        {
            MessageBox.Show("Version " + version + " is available!");
        }
    }
如果您将URL更改为google.com,它将起作用。我怎样才能把这个送到你的办公室 为Github.com工作或者为什么失败


谢谢

我的示例代码发生在GUI线程/单击响应中,因此我不必添加Console.ReadLine,对吗?源文件是最后两种方法:是否超时?马上离开?抛出异常?请提供更多关于它如何为您失败的信息。对不起,它根本没有任何作用。如果有超时,它比我在测试时等待的时间要长。