Share via


IPassportManager::OnStartPageManual

IPassportManager::OnStartPageManual

Instantiates the Passport Manager object using the supplied input variables instead of handling query strings and cookies through the built-in OnStartPage method. This method can be used to debug IIS-related instantiation problems, and can be used either in C++ or Active Server Pages (ASP).

Important  Either IPassportManager::OnStartPageECB or IPassportManager::OnStartPageManual must be called to initialize the Passport Manager object when writing a C++ ISAPI extension before any other IPassportManager methods will give correct results.

Syntax

HRESULT OnStartPageManual(
    BSTR queryStringT,
    BSTR queryStringP,
    BSTR MSPAuthCookie,
    BSTR MSPProfCookie,
    BSTR MSPProfCCookie,
    VARIANT vMSPSecCookie,
    VARIANT *pSetCookieArray
);

Parameters

  • queryStringT
    [in] A BSTR representing the incoming t (Ticket) variable in the query string, normally handled in-place by the Passport Manager object on an ASP page.
  • queryStringP
    [in] A BSTR representing the incoming p (Profile) variable in the query string, normally handled in-place by the Passport Manager object on an ASP page.
  • MSPAuthCookie
    [in] A BSTR representing the MSPAuth (Ticket) cookie, normally read by the Passport Manager object on an ASP page.
  • MSPProfCookie
    [in] A BSTR representing the MSPProf (Profile) cookie, normally read by the Passport Manager object on an ASP page.
  • MSPConsentCookie
    [in] A BSTR representing the MSPConsent (Consent) cookie, normally read by the Passport Manager object on an ASP page.
  • vMSPSecCookie
    [in, optional] A VARIANT (should be VT_BSTR) representing the MSPSec cookie, normally read by the Passport Manager object for SSL sign-in. SSL sign-in is not enabled at servers, so this parameter should always be set to an empty variant with .vt=VT_ERROR and .scode=DISP_E_PARAMNOTFOUND.
  • *pSetCookieArray
    [out, retval] A SafeArray VARIANT composed of both Microsoft .NET Passport cookies. This can be used to set the cookies manually using the EXTENSION_CONTROL_BLOCK structure in ISAPI. Returned as a SafeArray so that this method can still return results through automation.

Return values

Returns one of the following values:

S_OK Success.
PP_E_NOT_CONFIGURED Passport Manager object is misconfigured.
E_OUTOFMEMORY Not enough memory to write SafeArray of cookies.

Remarks

Parameters can be left NULL so that you can use either the values from the query string or from the cookies, depending on current state in ASP. For use in ISAPI, either both query string values or all three cookie values must be entered in order for the object to have proper context and for the returned SafeArray to make sense. MSPProfC cookie can be left as empty string if not attempting to use this Passport Manager installation across tertiary domains. The most common use for this method will be from ISAPI filters or extensions, or for debug-only checks of the contents of various string buffers and server variables read or written to by the Passport Manager object. This might include determining whether the server is writing cookie contents differently based on Passport Manager query string parsing versus direct method inputs.

This method does not return E_INVALIDARG if the buffer is NULL or the buffer size passed in is too small. Instead, the following behavior occurs:

If pszBuffer=NULL, dwBufferSize contains the size of the cookie headers string being returned.

If pszBuffer!=NULL && dwBufferSize is less than or equal to the size of the cookie-headers string, pszBuffer contains the cookie headers string.

If pszBuffer!=NULL && dwBufferSize is less than the size of the cookie-headers string, pszBuffer is set to NULL and dwBufferSize contains the size of the cookie headers string being returned.

See Also

IPassportManager Interface