Creates a Federation from a NameValueCollection of parameters.
Namespace: Microsoft.IdentityModel.Protocols.WSFederation
Assembly: Microsoft.IdentityModel (in microsoft.identitymodel.dll)

Usage

Visual Basic
Dim baseUrl As Uri
Dim collection As NameValueCollection
Dim returnValue As WSFederationMessage

returnValue = WSFederationMessage.CreateFromNameValueCollection(baseUrl, collection)

Syntax

Visual Basic
Public Shared Function CreateFromNameValueCollection ( _
		baseUrl As Uri, _
		collection As NameValueCollection _
) As WSFederationMessage
C#
public static WSFederationMessage CreateFromNameValueCollection (
		Uri baseUrl,
		NameValueCollection collection
)
C++
public:
static WSFederationMessage^ CreateFromNameValueCollection (
		Uri^ baseUrl, 
		NameValueCollection^ collection
)
J#
public static WSFederationMessage CreateFromNameValueCollection (
		Uri baseUrl, 
		NameValueCollection collection
)
JScript
public static function CreateFromNameValueCollection (
		baseUrl : Uri, 
		collection : NameValueCollection
) : WSFederationMessage

Parameters

baseUrl

BaseUrl to which the message is intended.

collection

NameValueCollection of the parmaters.

Return Value

Instance of WSFederation message of null if a message cannot be constructed.

Exceptions

Exception type Condition
ArgumentException

This method can throw an ArgumentExcpetion for the following cases 1. A SignIn Response message has both the wresult and wresultptr parameter. 2. Action parameter is not recognized.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2008, Windows Vista, Not tested on Windows XP

See Also