AuthManager.URLShopperArgs Method (PIA)
Use this method to generate an encoded Uniform Resource Locator (URL) query string of name/value pairs and append the ticket to the query string if a ticket is set.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop
…
Public Function URLShopperArgs(ByRef pVarURLParameters As Object,
ByRef pVarURLValues As Object) As String
[C#]
using Microsoft.CommerceServer.Interop;
…
string URLShopperArgs(refobjectpURLParameters,
refobjectpURLValues);
Parameters
[Visual Basic .NET]
- pVarURLParameters
A System.Array that contains the parameter names. - pVarURLValues
A System.Array that contains the values corresponding to the parameter names.
[C#]
- oURLParameters
An object containing a System.Array of parameter names. - oURLValues
An object containing a System.Array of parameter values corresponding to the parameter names.
Return Values
[Visual Basic .NET] If this method completes successfully, it returns a String that contains the encoded-URL string.
[C#] This method returns a string that contains the resulting encoded-URL query string.
Exceptions
This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.
[Visual Basic .NET]
The following table shows the custom COM errors that this method can return.
Value | Description |
---|---|
&HC1004C24 | This method should only be called within an ASP page. |
&HC1004C10 | The Initialize method must be called with the installed site name before calling this method. |
[C#]
The following table shows the custom COM errors that a COMException can wrap.
Value | Description |
---|---|
0xC1004C24 | This method should only be called within an ASP page. |
0xC1004C10 | The Initialize method must be called with the installed site name before calling this method. |
Remarks
This method concatenates the parameter name/value pairs into an encoded URL string and appends the ticket. This is useful for cookieless shopping support. This method will fail if the two arrays containing the parameters and values are not the same size.
If both types of tickets exist, the AuthTicketType ticket takes precedence.
Use the URLArgs method to perform URL encoding of parameter/value pairs without appending the ticket.
[Visual Basic .NET]
Example
' saParameterNames and saParameterValues are SafeArrays
' sURLShopArg is a string
' oAuthManager is a Commerce AuthManager object
saParameterNames(0) = "sku1"
saParameterNames(1) = "sku3"
saParameterValues(0) = "12345"
saParameterValues(1) = "98765"
sURLShopArg = oAuthManager.URLShopperArgs(saParameterNames, saParameterValues)
' sURLShopArg =
' "?sku1=12345&sku3=98765&MSCSAuth=Q0H4SE915ASH2KC000Q79QB1E"
Requirements
Namespace: Microsoft.CommerceServer.Interop
Platforms: Windows 2000, Windows Server 2003
Assembly: mscsauthlib (in mscsauthlib.dll)
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.