« Previous Next »

Thread: Real time logging - HTTP Status code 46, 48 etc

Last post 10-20-2009 1:26 PM by bobbyv. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 10-13-2009, 9:25 AM

    • jjy2
    • Not Ranked
    • Joined on 09-17-2007, 7:42 PM
    • Posts 13

    Real time logging - HTTP Status code 46, 48 etc

    When I check http status code, code 200 is always ok. 
    but I get "46", "48" etc instead of 404, 304 and so on.
    maybe I shouldn't just cast *pbData to short?

    However if I select "Write to disk" option and see the log files, it correctly written 404 and 304 etc.. 

    Thank you

  • 10-13-2009, 1:58 PM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 12:12 AM
    • Redmond, WA
    • Posts 57

    Re: Real time logging - HTTP Status code 46, 48 etc

    what do you mean when you say "when I check http status code"?  Are you using real-time logging?  I believe the type for 'status' is 'TypeSInt16'.  Can you try casting to that?

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 10-14-2009, 7:52 AM In reply to

    • jjy2
    • Not Ranked
    • Joined on 09-17-2007, 7:42 PM
    • Posts 13

    Re: Real time logging - HTTP Status code 46, 48 etc

    bobbyv:
    I believe the type for 'status' is 'TypeSInt16'

    Sorry but what's TypeSInt16? where can I find information?
    I am using real-time logging.
     
    Thanks

  • 10-14-2009, 2:36 PM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 12:12 AM
    • Redmond, WA
    • Posts 57

    Re: Real time logging - HTTP Status code 46, 48 etc

    Sorry.  That should be type sint16.  i'm assuming you're using a c++ app to consume this, correct? 

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 10-15-2009, 6:02 AM In reply to

    • jjy2
    • Not Ranked
    • Joined on 09-17-2007, 7:42 PM
    • Posts 13

    Re: Real time logging - HTTP Status code 46, 48 etc

    Hi Bobby,

    what I am doing is that I copy HTTP_TRACE_EVENT parameter value received in ProcessLogEvent function of my module, then the copy is sent to a message queue.

    Below is HTTP_TRACE_EVENT_ITEM filled with "Status" info, captured while I was debugging. (It's original parameter value, not a copy) 

    If it is 2 bytes signed int16, it gives me value of 48. I expect this to be either 404 or 304. (In fact, only status 200 seems to be valid among all data I captured.)

    Except for message queue part, my module code is almost identical to the sample code found in Real-Time logging article in this site.

    Isn't the "Status" item's value above look strange? 

  • 10-15-2009, 11:57 PM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 12:12 AM
    • Redmond, WA
    • Posts 57

    Re: Real time logging - HTTP Status code 46, 48 etc

    hi jjy2,

    give me a couple of days to look into this.  thx...

    - bobby

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 10-19-2009, 4:39 PM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 12:12 AM
    • Redmond, WA
    • Posts 57

    Re: Real time logging - HTTP Status code 46, 48 etc

    Hi jjy2, I apologize. You were correct when you were using a short. The pTraceEventItem->dwDataType will tell you how to cast the pTraceEventItem->pbData pointer. So in this case, you would want to cast the pTraceEventItem->pbData pointer as a pointer to a short (short *). To see the value (dereference the pointer), you would just look at it using *(short *) pTraceEventItem->pbData .

    Are you reading these values from 'memory'? Or are you coverting them and persisting them somewhere? We're actually seeing the correct values showing up whether or not 'write to disk' is enabled.

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 10-19-2009, 9:17 PM In reply to

    • jjy2
    • Not Ranked
    • Joined on 09-17-2007, 7:42 PM
    • Posts 13

    Re: Real time logging - HTTP Status code 46, 48 etc

    Hi Bobby.. I am so sorry wasting your time. I somehow incorrectly casted the PBYTE to short resulting in trucating second bytes of the short value...  clearly notC++ expert.. beginner..
    Thanks for your help.. 

  • 10-20-2009, 1:26 PM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 12:12 AM
    • Redmond, WA
    • Posts 57

    Re: Real time logging - HTTP Status code 46, 48 etc

    No worries.  We appreciate you using our product so feel free to ask any additional questions you may have.

    This posting is provided "AS IS" with no warranties, and confers no rights.
Page 1 of 1 (9 items)
Microsoft Communities