Click here to Skip to main content
14,937,163 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi when im sending request to server and after sending request im validatingthe error

What I have tried:

CComBSTR bstrResponse;
   
        CString bstrResponse1= m_pIXMLHTTPRequest->GetresponseText();
//
MSXML2::IServerXMLHTTPRequest2Ptr m_pIXMLHTTPRequest;

bstrResponse1 is coming as empty always.
Posted
Comments
Richard MacCutchan 17-Jul-18 8:11am
   
How interesting, I wonder why.
Member 13089825 17-Jul-18 8:12am
   
yeah,i didnt find solution yet,im checking
Jochen Arndt 17-Jul-18 8:12am
   
GetresponseText() is not an IServerXMLHTTPRequest member function and we don't know what you have done before calling that function (e.g. if you have checked if the request was successful).

So we can't know what happened.
Member 13089825 17-Jul-18 8:17am
   
sorry ,
CComBSTR bstrResponse;
HRESULT hr = m_pIXMLHTTPRequest->get_responseText(&bstrResponse);
Jochen Arndt 17-Jul-18 8:22am
   
Is the HRESULT S_OK and was the request successful?
Member 13089825 17-Jul-18 8:24am
   
yes it s_OK only
Jochen Arndt 17-Jul-18 8:32am
   
Then it should be not empty if the request has been successfully send and a response has been received.

But we still can't help because we have no access to your code, the server, or even know what you have done before getting the response string.
Member 13089825 17-Jul-18 9:15am
   
when i used the HRESULT hr = m_pIXMLHTTPRequest->get_statusText(&bstrResponse);
bstrResponse is coming as "unauthorized"
Richard MacCutchan 17-Jul-18 12:00pm
   
So you need to check why.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900