0
我正在嘗試下載url上的pfx文件。在Chrome上打開鏈接時,我必須選擇一個證書然後登錄。但是當我用C#WebClient嘗試它時,出現了403「Forbidden」錯誤。Webclient用ClientCertificate下載文件
如何指定證書或以編程方式繞過此步驟?
我的代碼:
using (var client = new System.Net.WebClient())
{
client.Credentials = new System.Net.NetworkCredential(MyLogin, MyPassword);
client.DownloadFile(MyUrl, MyFile);
}
@MercuryX希望它會幫助你 –