簡體   English   中英

Windows應用商店應用-加密密鑰對話框

[英]Windows store app - cryptographic key dialog

我設法在C#中創建加密密鑰對話框(下面的代碼),並且獲得響應消息的狀態代碼確定。 沒關系。

但是現在我想知道,是否可以在javascript項目中完成同樣的想法? 我更喜歡使用javascript,因為我無法獲得Ajax請求以在C#中工作(我使用它來從api訪問數據)。

        try
        {
            HttpClientHandler aHandler = new HttpClientHandler();
            aHandler.ClientCertificateOptions = ClientCertificateOption.Automatic;

            HttpClient aClient = new HttpClient(aHandler);
            HttpResponseMessage aResp = await aClient.GetAsync("https://www.somelink.com/"); //this is not the link I used
            txtBlock.Text = aResp.StatusCode.ToString();
        }
        catch (Exception theEx)
        {
            txtBlock.Text = theEx.Message;
        }

在此處輸入圖片說明

從這個線程可以看到:

http://social.msdn.microsoft.com/Forums/windowsapps/en-US/0d005703-0ec3-4466-b389-663608fff053/using-client-side-certificates-in-windows-metro?forum=winappswithcsharp

Gaurav Mantri(MVP),2012年9月6日,星期四,1:15 PM

他嘗試通過C#和JS編程導入證書,在JS中他設法做到了這一點,因此,如果他需要該證書,則可以使用它,從邏輯上講-在JS中可能

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM