开发者

What request info to log in an ASP.Net MVC application

I'm not concerned w开发者_开发问答ith logging for defect fixing, but more for google-like analytics. Does anyone have a killer schema that they use to make analytics easier. I'd prefer to have control over the analytics on my site and am looking for good practices/ideas/implementations.


I would first look at the properties available in the current HttpRequest class such as:

  • HttpMethod
  • Path
  • PathInfo
  • QueryString
  • RawUrl
  • UrlReferrer
  • UserAgent

You may also want to record, if applicable:

HttpSessionState.SessionID

You could then log the information you need into a database for every request for later analysis. How you analyse the data depends on what you want to know.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜