Professional Web Applications Themes

Including connection string in file - ASP Database

How do you get around the security issue of having your connection string file as an include? Meaning, anyone who views the source of your page can get the file name and read the file contents of your connection string? James...

  1. #1

    Default Including connection string in file

    How do you get around the security issue of having your
    connection string file as an include? Meaning, anyone
    who views the source of your page can get the file name
    and read the file contents of your connection string?

    James
    James Guest

  2. #2

    Default Re: Including connection string in file

    I've generally put mine in an application variable, set in global.asa

    however, your assertion isn't correct. ASP code is not avilable in a
    view->source, and neither are include statements, so this isn't an issue as
    you've described it.


    --
    Jason Brown
    Microsoft GTSC, IIS

    This posting is provided "AS IS" with no warranties, and confers no rights.

    "James Johnson" <microsoft.com> wrote in message
    news:2f1c01c4b005$4c325ab0$gbl... 


    Jason Guest

  3. #3

    Default Including connection string in file

    <SNIP> 

    Viewing the source of a page will only display the html
    that is sent back to to your browser by the web server
    after it has pd the asp page and done its thing with
    the server-side code. All the server-side code, including
    your connection string, isn't sent back to the browser.
    Luis Guest

  4. #4

    Default Re: Including connection string in file

    > How do you get around the security issue of having your 

    Can you show an ASP file that reveals its connection string (regardless of
    whether it comes from an include) in view source? Have you actually tried
    to reproduce this problem, or are you just making an assumption about how
    ASP works?

    Now, if you use an .inc extension and tell people where your include file
    is, then certainly they can get access to it by typing that URL directly.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)


    Aaron Guest

  5. #5

    Default Re: Including connection string in file

    If you are concerned about someone viewing your source, then you have bigger
    problems :)

    The best way to protect SQL passwords is to have a "pass-through" component
    that will connect to the database and do the exact same things you would
    otherwise do with Connection/Command objects. You can then register the
    component in COM+, let it impersonate a user and connect to the database via
    a trusted connection.

    Hope that helps.

    --
    Manohar Kamath
    Editor, .netWire
    www.dotnetwire.com


    "James Johnson" <microsoft.com> wrote in message
    news:2f1c01c4b005$4c325ab0$gbl... 


    Manohar Guest

Similar Threads

  1. including file and paths
    By Mark in forum PHP Development
    Replies: 0
    Last Post: May 2nd, 11:57 PM
  2. including AS file throws an error...
    By OHSAH webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: January 21st, 09:16 PM
  3. #25645 [Opn->Fbk]: Error including a PHP file from within an SSI
    By sniper@php.net in forum PHP Development
    Replies: 0
    Last Post: September 24th, 03:50 PM
  4. #25645 [NEW]: Error including a PHP file from within an SSI
    By makull at freemail dot nl in forum PHP Development
    Replies: 0
    Last Post: September 24th, 03:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139