Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ServerUtils methods

ServerUtils methods

The ServerUtils type exposes the following members.

  Name Description
Public method Static member CreateStackTraceId Returns an integer that identifies the specified exception.
Public method Static member GetAbsoluteLocation Gets the full URL to an object's location.
Public method Static member GetCurrentCulture
Public method Static member GetCurrentUserDisplayName Returns the display name of the current user who is accessing the site.
Public method Static member GetCurrentUserName Returns the user name of the current user who is accessing the site.
Public method Static member GetCurrentUserNow Returns DateTime.Now in the current user's configured timezone.
Public method Static member GetCurrentUserWindowsIdentityName Returns the user name of the current user, if the account is an authenticated Windows identity or claims-based identity.
Public method Static member GetTempFileForCurrentUser Returns the path to the local temporary file that has access rights for the current user.
Public method Static member HandleException(Exception) Logs an exception in the event log.
Public method Static member HandleException(String, Exception, ErrorCode) Logs an exception in the event log.
Public method Static member IsAccessDeniedException Determines whether an exception is a result of insufficient permissions.
Public method Static member IsAnonymousUser Determines whether the current user is using the site as the anonymous user.
Public method Static member MakeSecureString Converts the specified string into a SecureString object.
Public method Static member SecureStringToString Extracts the string value from the specified SecureString object.
Public method Static member SetThreadCultures Sets the locale of the current thread to the locale of the current site.
Public method Static member ShouldLog Determines whether to log access exceptions.
Top
Show:
© 2015 Microsoft