CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2008
    Location
    Bangalore
    Posts
    12

    [RESOLVED] Getting Error :- 404

    Hello Everyone,

    I am working on client server application.
    i am Using HttpSendRequest() function with passing headers as the parameters.

    I am getting Error 404.

    Code snipet :-

    nResult = HttpSendRequest(m_hInternet, headers,
    wcslen(headers),szHeader,wcslen(szHeader));

    headers :- wsprintf(headers,TEXT("Content-Type: %s\r\nContent-Length:
    %d\r\nAccept-Encoding: deflate\r\nUncompressed-Content-Length: %d\r\nContent-Encoding: deflate"),
    SYNCML_CONTENT_TYPE,&dwOptionalLength,&dwOptionalLength);


    PWSTR szHeader = L"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><SyncML><SyncHdr>
    <VerDTD>1.1</VerDTD><VerProto>SyncML/1.1</VerProto><SessionID>1</SessionID>
    <MsgID>1</MsgID><Target><LocURI>http://192.168.179.164:8080/funambol/ds</LocURI></Target><Source>
    <LocURI></LocURI></Source><Cred><Meta>
    <Type xmlns=\"syncml:metinf\">syncml:auth-basic</Type></Meta><Data>ZZ3Vlc3Q=</Data></Cred><Meta>
    <MaxMsgSize>250000</MaxMsgSize>
    <MaxObjSize>4000000</MaxObjSize></Meta><SyncHdr><SyncBody><Final/></SyncBody></SyncML>";

    Can anyone suggest what i am doing wrong.

    Any more information needed tell me.

    Thanks in advance.

  2. #2
    Join Date
    Mar 2001
    Posts
    2,529

    Re: Getting Error :- 404

    well that is the error for url or page not found.
    ahoodin
    To keep the plot moving, that's why.

  3. #3
    Join Date
    Nov 2008
    Location
    Bangalore
    Posts
    12

    Re: Getting Error :- 404

    If i am using 'GET' instead of 'POST' in HttpOpenRequest i am not getting any Error.

    I am suspecting that there is a problem in Headers what ever i am sending in sendRequest().
    Can anyone tell me where i can find the proper Header information.like <LocURI> what data needs to send? With examples.

  4. #4
    Join Date
    Nov 2008
    Location
    Bangalore
    Posts
    12

    Resolved Re: Getting Error :- 404

    Problem is Solved.
    Header length were wrong

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured