IServerXMLHTTPRequest on HTTPS

I am trying to implement a c++ application that will access an HTTPS server using IServerXMLHTTPRequest.

When I try to run the code below, the server returns an 403 (Forbidden) error.

What could be the cause of this? And, what should I do about this?

My current code is:


    CComPtr<MSXML2::IServerXMLHTTPRequest> xmlHttp;
    HRESULT hr = xmlHttp.CoCreateInstance(__uuidof(ServerXMLHTTP));
    hr = xmlHttp->open(_T("POST"),_T("https://someurl.com/somepath"),false);
    hr = xmlHttp->setTimeouts( 100000,
            50000,
            100000,
            100000
            );
    hr = xmlHttp->setOption(SXH_OPTION_SELECT_CLIENT_SSL_CERT,
                            xmlHttp->getOption(SXH_OPTION_SELECT_CLIENT_SSL_CERT));
    hr = xmlHttp->setRequestHeader(_T("Content-Type"),_T("application/x-www-form-urlencoded"));
    sPostData = ...;
    hr = xmlHttp->send((BSTR)sPostData);

Not really familiar with this specific interface but reading the constants it sounds like you are trying to use a client certificate. Is the server configured that way?

I would strongly suspect the general purpose microsoft built Http Request object can do just about anything you can do over http.