本文整理汇总了VB.NET中System.Web.ClientServices.ClientFormsIdentity.RevalidateUser方法的典型用法代码示例。如果您正苦于以下问题:VB.NET ClientFormsIdentity.RevalidateUser方法的具体用法?VB.NET ClientFormsIdentity.RevalidateUser怎么用?VB.NET ClientFormsIdentity.RevalidateUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.ClientServices.ClientFormsIdentity
的用法示例。
在下文中一共展示了ClientFormsIdentity.RevalidateUser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: CType
Private Sub workOfflineCheckBox_CheckedChanged( _
ByVal sender As Object, ByVal e As EventArgs) _
Handles workOfflineCheckBox.CheckedChanged
ConnectivityStatus.IsOffline = workOfflineCheckBox.Checked
If Not ConnectivityStatus.IsOffline Then
Try
' Silently re-validate the user.
CType(System.Threading.Thread.CurrentPrincipal.Identity, _
ClientFormsIdentity).RevalidateUser()
' If any settings have been changed locally, save the new
' new values to the Web settings service.
SaveSettings()
' If any settings have not been changed locally, check
' the Web settings service for updates.
My.Settings.Reload()
Catch ex As System.Net.WebException
MessageBox.Show( _
"Unable to access the authentication service. " & _
Environment.NewLine + "Staying in offline mode.", _
"Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning)
workOfflineCheckBox.Checked = True
End Try
End If
End Sub