HttpRequestMessageExtensionMethods.GetUserPrincipal Method

.NET Framework 4.5

Gets the user principal associated with the specified HTTP request message.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

'Declaration
<ExtensionAttribute> _
Public Shared Function GetUserPrincipal ( _
	httpRequestMessage As HttpRequestMessage _
) As IPrincipal

Parameters

httpRequestMessage
Type: System.Net.Http.HttpRequestMessage

The HTTP request message from which to get the user principal.

Return Value

Type: System.Security.Principal.IPrincipal
The user principal associated with the specified HTTP request message.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type HttpRequestMessage. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework

Supported in: 4.6, 4.5
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft