本文整理汇总了VB.NET中System.Web.ClientServices.ClientFormsIdentity.AuthenticationType属性的典型用法代码示例。如果您正苦于以下问题:VB.NET ClientFormsIdentity.AuthenticationType属性的具体用法?VB.NET ClientFormsIdentity.AuthenticationType怎么用?VB.NET ClientFormsIdentity.AuthenticationType使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Web.ClientServices.ClientFormsIdentity
的用法示例。
在下文中一共展示了ClientFormsIdentity.AuthenticationType属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: SaveSettings
Private Sub SaveSettings()
Dim identity As System.Security.Principal.IIdentity = _
System.Threading.Thread.CurrentPrincipal.Identity
' Return if the user is not authenticated.
If identity Is Nothing OrElse Not identity.IsAuthenticated Then Return
' Return if the authentication type is not "ClientForms". This indicates
' that the user is not authenticated for client application services.
If Not identity.AuthenticationType.Equals("ClientForms") Then Return
Try
My.Settings.Save()
Catch ex As System.Net.WebException
MessageBox.Show("Unable to access the Web settings service. " & _
"Settings were not saved on the remote service.", _
"Not logged in", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End Try
End Sub