Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What we (Slipjig and I) found out this week is that there does appear to be a way around these issues, or at least, we're on the trail to determining whether there is a reliable, repeatable way. We're still not positive on that, but here's what we know so far:</p> <p>At first pass, if you have code like this you can start making requests with either the Browser or Client stack:</p> <p>First, place a "WebBrowser" control in your Silverlight XAML, and make it send a request to your HTTPS site.</p> <p>This may pop up the certificate dialog box for the user. Big deal. Accept it. If you have only one cert, then you can turn an option in IE off to suppress that message.</p> <pre><code>private void Command_Click(object sender, RoutedEventArgs e) { // This does not pop up the cert dialog if the option to take the first is turned on in IE settings: BrowserInstance.Navigate(new Uri("https://www.SiteThatRequiresClientCertificates.com/")); } </code></pre> <p>Then, in a separate handler invoke by the user, create an instance of your stack, either Client or Browser:</p> <pre><code>private void CallServer_Click(object sender, RoutedEventArgs e) { // Works with BrowserHttp factory also: var req = WebRequestCreator.ClientHttp.Create(new Uri("https://www.SiteThatRequiresClientCertificates.com/")); req.Method = "GET"; req.BeginGetResponse(new AsyncCallback(Callback), req); } </code></pre> <p>Finally, the Callback:</p> <pre><code>private void Callback(IAsyncResult result) { var req = result.AsyncState as System.Net.WebRequest; var resp = req.EndGetResponse(result); var content = string.Empty; using (var reader = new StreamReader(resp.GetResponseStream())) { content = reader.ReadToEnd(); } System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =&gt; { Results.Text = content; }); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload