How to access address bar in C# Application RRS feed

  • Question

  • User-371366585 posted

    Respected member's


    I am trying to log whatever address is being typed in internet explorer. For example if i type www.google.co.in, i want that to be logged in a text file.

    Please help me if there is a way. Does this require a dll import?

    Thanking one and all.



    Monday, March 23, 2009 8:37 AM


  • User541108374 posted


    I suggest that you plug in a custom HttpModule into your Http pipeline so you can handle this situation. Take a look at ELMAH. This is more for exception logging but you can easily grab the

    HttpContext.Current.Request.RawUrl (http://msdn.microsoft.com/en-us/library/system.web.httputility.aspx).

    for example and write that to a data store (file or database or ...).

    Another option could be to use Entlib from Microsoft which has logging capabilities or Log4Net.

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 23, 2009 8:41 AM