This is a migrated thread and some comments may be shown as answers.

radwindow not asking for client certificate on clear

2 Answers 59 Views
Window
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 28 Oct 2014, 05:33 PM
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.

  <tr>
                <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>
                </td>
            </tr>
        </table>
 
       <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"
        rdmanager.Windows.Add(window)
    End Sub
 
Here is code for the sign RAdwindow
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
         <script type="text/javascript">
             function Clear() {
                 document.execCommand("ClearAuthenticationCache");
             }
 
             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();
                 oWnd.close();
             }
         </script>
</head>
<body onload="Clear()">
    <form id="form1" runat="server">
        <div>
            <asp:HiddenField ID="HFSign" runat="server" Visible="false" />
        </div>
    </form>
</body>
</html>
 
  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
 
            SavePage()
        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 & "')"
 
        insertUpdateDelete(sql)
 
        ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "ReloadScheduler", "reloadParent();", True)
        
    End Sub






















2 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 1
answered on 28 Oct 2014, 06:29 PM
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"
      rdmanager.Windows.Add(window)
0
Marin Bratanov
Telerik team
answered on 29 Oct 2014, 01:33 PM

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.


Regards,

Marin Bratanov
Telerik
 

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.

 
Tags
Window
Asked by
Kevin
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or