WSFederationMessage.TryCreateFromUri Method (Uri, WSFederationMessage)

.NET Framework (current version)
 

Attempts to create a WS-Federation message from the specified URI. The parameters are assumed to be specified as a query string.

Namespace:   System.IdentityModel.Services
Assembly:  System.IdentityModel.Services (in System.IdentityModel.Services.dll)

public static bool TryCreateFromUri(
	Uri requestUri,
	out WSFederationMessage fedMsg
)

Parameters

requestUri
Type: System.Uri

The URI from which to create the message. Message parameters are specified in the query string. The wa parameter must be present.

fedMsg
Type: System.IdentityModel.Services.WSFederationMessage

When this method returns, contains the message that was created or null if a message could not be created. This parameter is treated as uninitialized.

Return Value

Type: System.Boolean

true if a message was successfully created; otherwise, false.

Exception Condition
ArgumentNullException

requestUri is null.

If a message can be created, the method returns an appropriate implementation of WSFederationMessage based on the wa parameter in the query string; for example, if wa parameter is "wsignout1.0" then a SignOutRequestMessage object is returned.

Invokes the CreateFromNameValueCollection method.

.NET Framework
Available since 4.5
Return to top
Show: