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>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
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