Windows商店应用程序 - 加密密钥对话框

问题描述:

我设法在c#中创建加密密钥对话框(代码如下),并获得响应消息的状态代码。没关系。Windows商店应用程序 - 加密密钥对话框

但现在我想知道,如果这同样的想法可以在JavaScript项目中完成?我更喜欢使用JavaScript,因为我无法获得在c#中工作的ajax请求(我使用它来访问来自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; 
     } 

enter image description here

,我可以从这个线程看到:

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

周四,2012年9月6日下午1:15从拉夫Mantri(MVP)

他试图在C#和JS中编程导入证书,在JS中他设法导入证书,所以如果他需要证书,那么他使用它,所以逻辑上 - t可能在JS