BuildUrl Method (String, Boolean, String[], String[])
(Obsolete) Use this method to generate an encoded URL string, with an array of names and values.
Namespace: Microsoft.CommerceServer.Runtime
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Function BuildUrl ( _
fileName As String, _
secure As Boolean, _
urlParameterNames As String(), _
urlParameterValues As String() _
) As String
'Usage
Dim instance As QueryStringBuilder
Dim fileName As String
Dim secure As Boolean
Dim urlParameterNames As String()
Dim urlParameterValues As String()
Dim returnValue As String
returnValue = instance.BuildUrl(fileName, _
secure, urlParameterNames, urlParameterValues)
public string BuildUrl(
string fileName,
bool secure,
string[] urlParameterNames,
string[] urlParameterValues
)
public:
String^ BuildUrl(
String^ fileName,
bool secure,
array<String^>^ urlParameterNames,
array<String^>^ urlParameterValues
)
public function BuildUrl(
fileName : String,
secure : boolean,
urlParameterNames : String[],
urlParameterValues : String[]
) : String
Parameters
- fileName
Type: System..::.String
- secure
Type: System..::.Boolean
The secure flag, set to true for https and false for http. Https will be used for the URL if this flag is true and the site is enabled for https.
- urlParameterNames
Type: array<System..::.String>[]()[]
An array of strings containing parameter names. The array must be the same size as the urlParameterValue parameter value.
- urlParameterValues
Type: array<System..::.String>[]()[]
Return Value
Type: System..::.String
The encoded URL string.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | urlParameterNames or urlParameterValues is nullNothingnullptra null reference (Nothing in Visual Basic). |
CommerceAuthenticationException | The URL could not be obtained. |
CommerceAuthenticationException | The two arrays are not of equal size. |
Remarks
You have to use the BuildUrl method every time you want to append the ticket to the URL in a cookieless scenario. If this is not done, the ticket will not be passed on to the next request. If filename is not nullNothingnullptra null reference (Nothing in Visual Basic), the COM method AuthManager.GetURL is called. If filename is nullNothingnullptra null reference (Nothing in Visual Basic), and if the CookieSupport property is set to true, then the AuthManager.UrlShopperArgs COM method is called. If filename is nullNothingnullptra null reference (Nothing in Visual Basic) and the CookieSupport property is set to false, then AuthManager.UrlArgs COM method is called.
The urlParameterNames and urlParameterValues arrays must be the same size.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.