Please enable JavaScript to view this site.

Altova MapForce Server 2020 Advanced Edition

Adds a property to the current credential (for example, the username, the password, or both). The first argument specifies the property name, and the second argument specifies the property value. Valid property names: username, password. In MapForce Server Advanced Edition, the property name oauth:token is additionally supported.

 

This method must be called after calling BeginCredential() and before calling EndCredential().

 

Signature

AddCredentialProperty(in bstrName:System.String, in bstrValue:System.String) -> Void

Generic signature

void AddCredentialProperty(string bstrName, string bstrValue)

C#

HRESULT AddCredentialProperty([in] BSTR bstrName, [in] BSTR bstrValue );

C++

Sub AddCredentialProperty(ByVal bstrName As String, ByVal bstrValue As String)

VB.NET

 

Parameters

Name

Type

Description

bstrName

System.String

Specifies the name of the credential property.

bstrValue

System.String

Specifies the value of the credential property.

 

Examples

The following code listing illustrates how to declare a credential called "mycredential" in C#. The credential name must be the one given to the credential in MapForce at design time.

 

//Create a MapForce Server object

Altova.MapForceServer.Server objMFS = new Altova.MapForceServer.Server();

 

objMFS.BeginCredential("mycredential");

objMFS.AddCredentialProperty("username", "altova");

objMFS.AddCredentialProperty("password", "b45ax78!");

objMFS.EndCredential();

© 2019 Altova GmbH