SPUtility.EnsureAuthentication method
Determines whether the current user is authenticated, and that a context Web for the current HTTP request exists; otherwise, asks the user to authenticate.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Sub EnsureAuthentication
'Usage
SPUtility.EnsureAuthentication()
public static void EnsureAuthentication()