473,465 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Differentiating postback requests using a web server log analyzer

I've seen a few posts on this topic, but still haven't found a clean
solution. Anyone have other suggestions or feel that one of the
options I highlight below is the way to go?

The Problem
-----------
A sequence of user interactions span multiple ASP.NET http POST
PostBacks within the same page. There is a need to be able to
identify each step of the interaction at the web server level (using a
log analyzer such as WebTrends). However, the requested resource,
query string, and cookies are the only things accessible and the true
differentiation is in the form post data.
Possible Solutions
------------------
I have considered the following options, but #2 seems like the only
"complete" solution, yet it still doesn't feel right...

1) Alter the ASP.NET framework's __doPostBack JavaScript method to
add the eventTarget to the query string of the form's action.
- This won't cover Buttons or ImageButtons since they don't use
__doPostBack
- It can result in cryptic page identifiers (e.g.
ucInquiryResult$grdList$_ctl5$_ctl0)
+ Implementation Options:
* A Response filter - quick POC provided feasible, but what is the
performance cost?
* Try to override the function that generates the __doPostBack
function, but it appears to be in the private method
System.Web.UI.Page.RenderPostBackScript(), so I don't think this is a
viable option.

2) Create custom WebControls that inherit from Button, ImageButton,
LinkButton, etc. These could expose a property whose value is passed
to client side JavaScript as part of the click event. The JavaScript
would rewrite the query string of the form's action attribute.
- Not sure how many controls this would involve. What about
LinkButtons in a ButtonColumn of a DataGrid...?

3) Implement a response filter that recognizes input and anchor
elements and inserts the necessary JavaScript to inject identifiers
into the form action's query string.
+ This is similar to #2, but would be implemented as a central
Response filter rather than having to use multiple custom WebControls.
- However, there is no clear place to specify the desired
"identifier" and therefore results in the same "cryptic identifier"
problem of option #1.
- The string manipulation to generate this additional JavaScript
could be messy and error prone.

4) Could do one-off logic on each relevant control that triggers a
PostBack.
- Hard to maintain. Requires a full sweep of the app and ongoing
diligence, or else the choice to respond to requests from those who
want to collect statistics. The later would have an annoying lag in
getting the requested "identifiers" into production.

5) Implement a page name mapping layer in an HttpModule so a set of
URLs (one for each "identifier") can be used to target the same page.
- This can help for recognizing multiple different entry points, but
the subsequent PostBack requests will be indistinguishable from the
previous without employing another strategy for altering the action of
the HTML form element.

6) Instrument from inside the application. Need to figure out how
this would be published so it can be consumed by the appropriate
people/tools.
Thanks for your time,

Pete
Nov 18 '05 #1
4 1464
"Peter Jaffe" <pj****@nevo.com> wrote in message
news:5c**************************@posting.google.c om...
I've seen a few posts on this topic, but still haven't found a clean
solution. Anyone have other suggestions or feel that one of the
options I highlight below is the way to go?

The Problem
-----------
A sequence of user interactions span multiple ASP.NET http POST
PostBacks within the same page. There is a need to be able to
identify each step of the interaction at the web server level (using a
log analyzer such as WebTrends). However, the requested resource,
query string, and cookies are the only things accessible and the true
differentiation is in the form post data.


If I were you, I'd forget about all of the implementation ideas you came up
with, except for "6". Here's why.

You need to be able to log significant state changes. That's not a problem.
The problem is that all of the techniques you mention tie the logging of
state changes to the implementation details of how the page performed the
state change. Consider the case where you have a button which causes a state
change you need to log. What happens if you change that button to be a
LinkButton? If your logging mechanism needs to be concerned with the
implementation details of your page, you will have to change it.

Instead, have the code which performs the state change log the state change.
That way, it won't matter _how_ the state change is made, you'll log it just
the same. You might even want to centralize this in a class, so that you can
confirm that each state change is valid before you make it.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #2
Hi John,

Thanks for the quick and insightful reply. I completely agree that #6 is
the more pure architectural choice. However, the other aspect of the
problem I am facing is that my client already has WebTrends in place for
website usage analysis, and a rewrite of the app from ASP to ASP.NET has
resulted in reduced information being available through WebTrends reports.
I was hoping to be able to find some reasonably elegant compromise that
would at least uniquely tag each "view" thereby restoring their ability to
get useful info out of WebTrends (even if it involved changing the WebTrends
reports a little as UI controls are changed).

I may have to just start fighting the battle of either hooking into a
WebTrends API (I still have to look into this) or else encouraging the
client to use different reporting tools to get the statistics they used to
consume from WebTrends.

Thanks again!

Pete

"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:OA**************@TK2MSFTNGP10.phx.gbl...
"Peter Jaffe" <pj****@nevo.com> wrote in message
news:5c**************************@posting.google.c om...
I've seen a few posts on this topic, but still haven't found a clean
solution. Anyone have other suggestions or feel that one of the
options I highlight below is the way to go?

The Problem
-----------
A sequence of user interactions span multiple ASP.NET http POST
PostBacks within the same page. There is a need to be able to
identify each step of the interaction at the web server level (using a
log analyzer such as WebTrends). However, the requested resource,
query string, and cookies are the only things accessible and the true
differentiation is in the form post data.
If I were you, I'd forget about all of the implementation ideas you came

up with, except for "6". Here's why.

You need to be able to log significant state changes. That's not a problem. The problem is that all of the techniques you mention tie the logging of
state changes to the implementation details of how the page performed the
state change. Consider the case where you have a button which causes a state change you need to log. What happens if you change that button to be a
LinkButton? If your logging mechanism needs to be concerned with the
implementation details of your page, you will have to change it.

Instead, have the code which performs the state change log the state change. That way, it won't matter _how_ the state change is made, you'll log it just the same. You might even want to centralize this in a class, so that you can confirm that each state change is valid before you make it.
--
John Saunders
johnwsaundersiii at hotmail

Nov 18 '05 #3
the approach I use is a custom log filter, which looks at custom headers
your app adds for instrumentation.
-- bruce (sqlwork.com)

"Peter Jaffe" <pj****@nevo.com> wrote in message
news:5c**************************@posting.google.c om...
I've seen a few posts on this topic, but still haven't found a clean
solution. Anyone have other suggestions or feel that one of the
options I highlight below is the way to go?

The Problem
-----------
A sequence of user interactions span multiple ASP.NET http POST
PostBacks within the same page. There is a need to be able to
identify each step of the interaction at the web server level (using a
log analyzer such as WebTrends). However, the requested resource,
query string, and cookies are the only things accessible and the true
differentiation is in the form post data.
Possible Solutions
------------------
I have considered the following options, but #2 seems like the only
"complete" solution, yet it still doesn't feel right...

1) Alter the ASP.NET framework's __doPostBack JavaScript method to
add the eventTarget to the query string of the form's action.
- This won't cover Buttons or ImageButtons since they don't use
__doPostBack
- It can result in cryptic page identifiers (e.g.
ucInquiryResult$grdList$_ctl5$_ctl0)
+ Implementation Options:
* A Response filter - quick POC provided feasible, but what is the
performance cost?
* Try to override the function that generates the __doPostBack
function, but it appears to be in the private method
System.Web.UI.Page.RenderPostBackScript(), so I don't think this is a
viable option.

2) Create custom WebControls that inherit from Button, ImageButton,
LinkButton, etc. These could expose a property whose value is passed
to client side JavaScript as part of the click event. The JavaScript
would rewrite the query string of the form's action attribute.
- Not sure how many controls this would involve. What about
LinkButtons in a ButtonColumn of a DataGrid...?

3) Implement a response filter that recognizes input and anchor
elements and inserts the necessary JavaScript to inject identifiers
into the form action's query string.
+ This is similar to #2, but would be implemented as a central
Response filter rather than having to use multiple custom WebControls.
- However, there is no clear place to specify the desired
"identifier" and therefore results in the same "cryptic identifier"
problem of option #1.
- The string manipulation to generate this additional JavaScript
could be messy and error prone.

4) Could do one-off logic on each relevant control that triggers a
PostBack.
- Hard to maintain. Requires a full sweep of the app and ongoing
diligence, or else the choice to respond to requests from those who
want to collect statistics. The later would have an annoying lag in
getting the requested "identifiers" into production.

5) Implement a page name mapping layer in an HttpModule so a set of
URLs (one for each "identifier") can be used to target the same page.
- This can help for recognizing multiple different entry points, but
the subsequent PostBack requests will be indistinguishable from the
previous without employing another strategy for altering the action of
the HTML form element.

6) Instrument from inside the application. Need to figure out how
this would be published so it can be consumed by the appropriate
people/tools.
Thanks for your time,

Pete

Nov 18 '05 #4
"Peter Jaffe" <pj****@nevo.com> wrote in message
news:eQ**************@TK2MSFTNGP11.phx.gbl...
Hi John,

Thanks for the quick and insightful reply. I completely agree that #6 is
the more pure architectural choice. However, the other aspect of the
problem I am facing is that my client already has WebTrends in place for
website usage analysis, and a rewrite of the app from ASP to ASP.NET has
resulted in reduced information being available through WebTrends reports.
I was hoping to be able to find some reasonably elegant compromise that
would at least uniquely tag each "view" thereby restoring their ability to
get useful info out of WebTrends (even if it involved changing the WebTrends reports a little as UI controls are changed).

I may have to just start fighting the battle of either hooking into a
WebTrends API (I still have to look into this) or else encouraging the
client to use different reporting tools to get the statistics they used to
consume from WebTrends.


Peter, how was this accomplished with ASP?
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g.,...
5
by: Matthew Louden | last post by:
I created simple ASP.NET web application to test how AutoPostBack property in a web control works. I set AutoPostBack property to be true of a web control. When I run the application, here's the...
2
by: Bogosian | last post by:
Hi to all.I have to solve the following problem.I have to make a website which will be a web cache machine with the look of a real cache machine - screen and buttons below it.So i plan the...
4
by: Mervin Williams | last post by:
Postbacks cause a webform to re-display the page at the top. Well, I have a fairly long form and would like the page display to be re-positioned where the user clicked the button that caused the...
7
by: Mad Scientist Jr | last post by:
i have a dropdown control with autopostback=on that when selected, posts back and populates a second dropdown. the 2nd dropdown takes a while to load, giving the user time to start typing in other...
5
by: Darrel | last post by:
I'm dimming a string at the top of my page so I can use it in several different subs on the page. I'm setting the text in one sub and then reading it in several. I'd like to also use this...
8
by: Pietro | last post by:
Hi, i would like to know if there is a way to differentiate between requests, someting like a number that is unique only in the execution of an individual request. Thank you Pietro
6
by: Bryan | last post by:
I've got an ASP.NET application running that has a non-visual user interface (it's a voice app using VXML.) The voice client understands cookies and when it requests and aspx page, what actually...
1
by: m.a | last post by:
Hello, I want to investigate that data that is send to server during a postback. I want to know it so I can optimize the postback data to speed up the postback. It seems that my current...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.