radwindow not asking for client certificate on clear

3 posts, 0 answers
  1. Kevin
    Kevin avatar
    265 posts
    Member since:
    Jun 2011

    Posted 28 Oct 2014 Link to this post

    I am trying to clear the cleintcertificates on the loading of a radwindow.  What I am trying to do is force users to pick the client certificate agian on the page.  What I have is a radwinow that pops-up with the user agreement.  when they click the agree button it pops-up another radwindow thats sole purpose is to make them pick certificate agian and then it save info and close immediately.  however it is not prompting them for the certificate.  the application is HTTPs and asks for it when they start session and the clearauthenticationcache has worked for me on web pages but for some reason not with radwindow.  Don't know if I need to do something different.

                    <td  style="text-align:center">
                        <telerik:RadButton ID="btnAgree" runat="server" ButtonType="LinkButton" Text="Sign Agreement"></telerik:RadButton>
                        <asp:TextBox ID="txtSigned" runat="server" Width="400px" Height="60px" TextMode="MultiLine" ReadOnly="true" Visible="false" Font-Size="X-Small" CssClass="textScolls"></asp:TextBox>
           <telerik:RadWindowManager ID="rdmanager" runat="server" ShowContentDuringLoad="false" CenterIfModal="true" Modal="true" VisibleStatusbar="false" VisibleTitlebar="false" Behaviors="Close" OnClientClose="reloadParent" />
      Protected Sub btnAgree_Click(sender As Object, e As EventArgs) Handles btnAgree.Click
            Dim window As RadWindow = New RadWindow()
            window.NavigateUrl = "Sign.aspx"
            window.VisibleOnPageLoad = True
            window.Modal = True
            window.Width = "100"
            window.Height = "100"
        End Sub
    Here is code for the sign RAdwindow
    <!DOCTYPE html>
    <head runat="server">
             <script type="text/javascript">
                 function Clear() {
                 function GetRadWindow() {
                     var oWindow = null;
                     if (window.radWindow) oWindow = window.radWindow
                     else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                     return oWindow;
                 function reloadParent() {
                     var oWnd = GetRadWindow();
    <body onload="Clear()">
        <form id="form1" runat="server">
                <asp:HiddenField ID="HFSign" runat="server" Visible="false" />
      Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
            If Page.Request.ClientCertificate.IsPresent Then
                Dim certName As String = Page.Request.ClientCertificate.Item("SubjectCN")
                Dim issue As String = Page.Request.ClientCertificate.Item("Issuer")
                HFSign.Value = "Digitally Signed By: " & vbCrLf & " " _
                    & certName & vbCrLf & " " _
                    & "DN: " & issue & vbCrLf & " " _
                    & "cn= " & certName & vbCrLf & " " _
                    & "Date: " & Date.Now
            End If
        End Sub
        Private Sub SavePage()
            sql = "IF Exists (Select intAdminId from tblSignedAgreement where intAdminId = " & GetPersId() & ") Update tblSignedAgreement SET dtsigned = '" & Date.Now & "', strsigned = '" & HFSign.Value & "' where " _
                & "intadminId = " & GetPersId() & " ELSE Insert tblSignedAgreement (intAdminId, dtSigned, strSigned) VALUES (" & GetPersId() & ", '" & Date.Now & "', '" & HFSign.Value & "')"
            ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "ReloadScheduler", "reloadParent();", True)
        End Sub

  2. Kevin
    Kevin avatar
    265 posts
    Member since:
    Jun 2011

    Posted 28 Oct 2014 in reply to Kevin Link to this post

    Interesting update, I added a reload button the pop-up radwindow and as soon as I relaod it it prompts mne for the certifiate for the radwindow, why can't it do this on radwindow load and not reload?????
    Dim window As RadWindow = New RadWindow()
          window.NavigateUrl = "Sign.aspx"
          window.VisibleOnPageLoad = True
          window.Behaviors = WindowBehaviors.Reload
          window.Modal = True
          window.Width = "100"
          window.Height = "100"
  3. Marin Bratanov
    Marin Bratanov avatar
    3899 posts

    Posted 29 Oct 2014 Link to this post

    Hello Kevin,

    RadWindow loads the content page in an iframe and iframes often share cookies with the main page, so it is possible that the browser treats the iframe as a page it already knows how to handle.

    The reload button of the RadWindow calls the window.location.reload() method of the content page and does not do anything special.

    What I can suggest is trying to set the ReloadOnShow property to true. It will have the RadWindow append a random querystring value to the URL which is sure to result in a fresh GET request for the content page and this may help.


    Marin Bratanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top