Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. ASP.NET - Trace.axd includes Application variables

ASP.NET - Trace.axd includes Application variables

Scheduled Pinned Locked Moved The Weird and The Wonderful
databasecsharpasp-netsql-servercom
3 Posts 2 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ashley van Gerven
    wrote on last edited by
    #1

    Be very aware of this (or maybe it's common knowledge, and somehow I missed this vital info all these years). If you accidentelly leave tracing enabled on a production site, be aware that anyone can see the details for the past xx requests. Now normally this info is fairly mundane - control hierarchy and server variables. However, if you store connection strings in the HttpContext object, they will get output in the trace!! Could be very risky. Of course normally you would use the connectionstrings helper which is available with ASP.NET 2.0 onwards, however if you have an older app, you may be doing this (e.g. when you Server.MapPath() to your local access database or something, and later upgrade to SQL server but keep the connection string in httpcontext object :~ :~)

    "For fifty bucks I'd put my face in their soup and blow." - George Costanza

    CP article: SmartPager - a Flickr-style pager control with go-to-page popup layer.

    P 1 Reply Last reply
    0
    • A Ashley van Gerven

      Be very aware of this (or maybe it's common knowledge, and somehow I missed this vital info all these years). If you accidentelly leave tracing enabled on a production site, be aware that anyone can see the details for the past xx requests. Now normally this info is fairly mundane - control hierarchy and server variables. However, if you store connection strings in the HttpContext object, they will get output in the trace!! Could be very risky. Of course normally you would use the connectionstrings helper which is available with ASP.NET 2.0 onwards, however if you have an older app, you may be doing this (e.g. when you Server.MapPath() to your local access database or something, and later upgrade to SQL server but keep the connection string in httpcontext object :~ :~)

      "For fifty bucks I'd put my face in their soup and blow." - George Costanza

      CP article: SmartPager - a Flickr-style pager control with go-to-page popup layer.

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      So, if you forget to turn off debugging code and do some pretty stupid stuff around your storing of connections, and some user manages to try this and figure it out, you could be in trouble if your network isn't properly secured. Subtle.

      A 1 Reply Last reply
      0
      • P Paddy Boyd

        So, if you forget to turn off debugging code and do some pretty stupid stuff around your storing of connections, and some user manages to try this and figure it out, you could be in trouble if your network isn't properly secured. Subtle.

        A Offline
        A Offline
        Ashley van Gerven
        wrote on last edited by
        #3

        Paddy Boyd wrote:

        forget to turn off debugging code

        Yep, sloppy. Makes a stronger case for specifically scheduling code-reviews a while after initial development.

        Paddy Boyd wrote:

        pretty stupid stuff around your storing of connections

        OK, so apart from this potential scenario, what reason would you give me for NOT storing a connection string in the application state? (Bear in mind it has to call Server.MapPath.. so ConfigurationSettings.AppSettings is no good - and I'm talking .NET 1.1 here).

        Paddy Boyd wrote:

        Subtle.

        Yes it is. Especially for traditional ASP programmers - you just don't expect your Application variables to ever be visible to the public like that.

        "For fifty bucks I'd put my face in their soup and blow." - George Costanza

        CP article: SmartPager - a Flickr-style pager control with go-to-page popup layer.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups