Logging to the IIS Log files

Logging to the IIS Log files

Page 1 of 1

6 Replies - 18593 Views - Last Post: 18 November 2007 - 11:22 PM Rate Topic: -----

#1 Sim270   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 04-July 07

Logging to the IIS Log files

Post icon  Posted 25 October 2007 - 08:06 AM

Hi
Can anybody tell me how to write to the IIS log file from the ASP.NET application......

Basically i want to log the path along with the Query string which the user has clicked on the application.
Is This A Good Question/Topic? 0
  • +

Replies To: Logging to the IIS Log files

#2 sontek   User is offline

  • D.I.C Regular
  • member icon

Reputation: 8
  • View blog
  • Posts: 283
  • Joined: 13-September 01

Re: Logging to the IIS Log files

Posted 25 October 2007 - 08:41 PM

You can use the Response object (HttpResponse) heres the MSDN on it:
http://msdn2.microso...ppendtolog.aspx
Was This Post Helpful? 0
  • +
  • -

#3 Sim270   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 04-July 07

Re: Logging to the IIS Log files

Posted 26 October 2007 - 12:35 AM

View Postsontek, on 25 Oct, 2007 - 08:41 PM, said:

You can use the Response object (HttpResponse) heres the MSDN on it:
http://msdn2.microso...ppendtolog.aspx

Hey thanks a lot.....
is there any disadvantage of writing it in the iis log files......
In my case i want to log the the links clicked by the user on the site. and thereafter port that data to the SQl server tables.

Thanks....
Was This Post Helpful? 0
  • +
  • -

#4 sontek   User is offline

  • D.I.C Regular
  • member icon

Reputation: 8
  • View blog
  • Posts: 283
  • Joined: 13-September 01

Re: Logging to the IIS Log files

Posted 26 October 2007 - 04:49 PM

IIS Already logs what files are accessed but if you want to log query strings and everything, that'll make sense.

I would suggest using Log4net instead sending it to the IIS log.
Was This Post Helpful? 0
  • +
  • -

#5 Sim270   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 04-July 07

Re: Logging to the IIS Log files

Posted 29 October 2007 - 04:47 AM

View Postsontek, on 26 Oct, 2007 - 04:49 PM, said:

IIS Already logs what files are accessed but if you want to log query strings and everything, that'll make sense.

I would suggest using Log4net instead sending it to the IIS log.



Thanks! hey i am not aware of this Log4net ...it will be grt if u can pass on something related to this Log4net .
Was This Post Helpful? 0
  • +
  • -

#6 mattw   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 23
  • Joined: 02-September 07

Re: Logging to the IIS Log files

Posted 30 October 2007 - 03:06 AM

Hey Sim - the web address is http://logging.apache.org/log4net/. It can be a bit tricky to get implemented first time around, but persevere and read the documentation and it will be well worth your while.

Hope that helps! :)
Was This Post Helpful? 0
  • +
  • -

#7 Sim270   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 04-July 07

Re: Logging to the IIS Log files

Posted 18 November 2007 - 11:22 PM

View PostSim270, on 29 Oct, 2007 - 04:47 AM, said:

View Postsontek, on 26 Oct, 2007 - 04:49 PM, said:

IIS Already logs what files are accessed but if you want to log query strings and everything, that'll make sense.

I would suggest using Log4net instead sending it to the IIS log.



Thanks! hey i am not aware of this Log4net ...it will be grt if u can pass on something related to this Log4net .



Hi,
I opted to use the iis log as i have to log using Query strings....
But i am facing one problem in this approach....
I am logging on click of the html links on the gridview residing on the Web page which is on main frame page ie my page with grid is a frame .

on click of the link in iis log it is logging it twice even thought its clicked only once....ant Ideas for this log behaviour.......
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1