Export (0) Print
Expand All

HttpRequestMessageExtensionMethods.SetUserPrincipal Method

.NET Framework 4.5

Replaces 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 Sub SetUserPrincipal ( _
	httpRequestMessage As HttpRequestMessage, _
	user As IPrincipal _
)

Parameters

httpRequestMessage
Type: System.Net.Http.HttpRequestMessage

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

user
Type: System.Security.Principal.IPrincipal

The user principal to set.

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
Show:
© 2014 Microsoft