Best Security Practices for ASP against SQL Server

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Re: Best Security Practices for ASP against SQL Server

    No, you shouldn't use a DSN. You should use OLEDB connection strings and
    create your connection when you need it. You can store the connection
    string anywhere you'd like though.

    Get your OLE DB connection strings here: [url]http://www.connectionstrings.com/[/url]

    Set oADO = Server.CreateObject("adodb.connection")
    oADO.Open YourOLEDBConnectionString

    Ray at home

    --
    Will trade ASP help for SQL Server help


    "William Johnson" <wbj4@cdc.gov> wrote in message
    news:04a701c3515d$7d12fa70$a101280a@phx.gbl...
    > I have different bits of advice about what is acceptable
    > practice. I found a KB article (Q169377) advising to put
    > the DSN string in the global.asa. Is this really ok and
    > why?

    Ray at Guest

  2. Similar Questions and Discussions

    1. Best practices for applying server updaters?
      For purposes of this discussion, assume a production environment running ColdFusion MX 7.0.1 Enterprise with JRun4 (Mutliserver configuration). ...
    2. Patterns And Practices Security Checklists
      Hi, In Architecture and Design Review Security Checklist at following link: ...
    3. MAC OS X vs 9: WEB SERVER SECURITY?
      I was wondering what sys admin think when comparing security of Mac OS X (Apache) vs. Mac OS 9 (WebStar). I mean, after all, I don't know of any...
    4. security practices
      "Tim Mulholland" <tim@eyeresponse.com> wrote Tim, It sounds like you are running into a delegation issue (the local ASPNET user credentials...
    5. Security: ASP.Net + SQL Server DNZ
      (Been reading other messages on this subject but could not find an answer, that is why I'm posting this. Please note, although I have posted to...
  3. #2

    Default Re: Best Security Practices for ASP against SQL Server

    If you REALLY want the BEST security practice, you would
    use NT Integrated security for your authentication.

    However, this is not always feasible, especially for
    public websites.

    The problem with storing your connection string anywhere
    on the server, whether in the global.asa or anywhere else,
    is the uid and password are stored in clear text. This is
    a potential for compromise.

    We have created a VB dll and stored our connection strings
    there. Even this is not 100% secure, as it is technically
    possible to hack the dll and retrieve the uid and
    passwords, but it's more secure than storing them in a
    plain text file like global.asa. Our next step is to make
    the dll run in it's own security context and use NT
    integreted security for the dll. Then we won't even store
    the uid and password in the dll.

    >-----Original Message-----
    >I think he was asking from a security perspective.
    >
    >I usually put my connection strings in global.asa as a
    Session variable.
    >Keeping it in one spot makes it a lot easier if you
    change databases.
    >
    >
    >"Ray at <%=sLocation%>" <myfirstname at lane34 dot com>
    wrote in message
    >news:ODuqP5ZUDHA.1012@TK2MSFTNGP11.phx.gbl...
    >> No, you shouldn't use a DSN. You should use OLEDB
    connection strings and
    >> create your connection when you need it. You can store
    the connection
    >> string anywhere you'd like though.
    >>
    >> Get your OLE DB connection strings here:
    >[url]http://www.connectionstrings.com/[/url]
    >>
    >> Set oADO = Server.CreateObject("adodb.connection")
    >> oADO.Open YourOLEDBConnectionString
    >>
    >> Ray at home
    >>
    >> --
    >> Will trade ASP help for SQL Server help
    >>
    >>
    >> "William Johnson" <wbj4@cdc.gov> wrote in message
    >> news:04a701c3515d$7d12fa70$a101280a@phx.gbl...
    >> > I have different bits of advice about what is
    acceptable
    >> > practice. I found a KB article (Q169377) advising to
    put
    >> > the DSN string in the global.asa. Is this really ok
    and
    >> > why?
    >>
    >>
    >
    >
    >.
    >
    John Beschler Guest

  4. #3

    Default Re: Best Security Practices for ASP against SQL Server

    We keep our connectionstring and other global variables in a include file :
    sitevariables.asp

    and then in our asp-page it's just this include
    <!--include file="ourincludefolder/sitevariables.asp" -->

    You don't have to use session or application variable then.

    Dave Woestenborghs
    ASP Developer
    Belgium

    "Tom B" <shuckle@hotmail.com> wrote in message
    news:%23FlGWCeUDHA.2364@TK2MSFTNGP09.phx.gbl...
    > I think he was asking from a security perspective.
    >
    > I usually put my connection strings in global.asa as a Session variable.
    > Keeping it in one spot makes it a lot easier if you change databases.
    >
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > news:ODuqP5ZUDHA.1012@TK2MSFTNGP11.phx.gbl...
    > > No, you shouldn't use a DSN. You should use OLEDB connection strings
    and
    > > create your connection when you need it. You can store the connection
    > > string anywhere you'd like though.
    > >
    > > Get your OLE DB connection strings here:
    > [url]http://www.connectionstrings.com/[/url]
    > >
    > > Set oADO = Server.CreateObject("adodb.connection")
    > > oADO.Open YourOLEDBConnectionString
    > >
    > > Ray at home
    > >
    > > --
    > > Will trade ASP help for SQL Server help
    > >
    > >
    > > "William Johnson" <wbj4@cdc.gov> wrote in message
    > > news:04a701c3515d$7d12fa70$a101280a@phx.gbl...
    > > > I have different bits of advice about what is acceptable
    > > > practice. I found a KB article (Q169377) advising to put
    > > > the DSN string in the global.asa. Is this really ok and
    > > > why?
    > >
    > >
    >
    >

    DaWoE Guest

  5. #4

    Default Re: Best Security Practices for ASP against SQL Server

    That is a potential security risk if you store the
    password as part of the connection string. It is
    technically possible for IIS to return the contents of an
    ASP page to the browser under certain conditions. If you
    use an include file it should NOT have an ASP extension
    (or any extension that could be returned to the browser).
    MS recommends using the global.asa for that reason. If you
    want to store your site variables in the file as well, at
    least use a different exttension such as ".inc" The MS
    folks will correct me if I'm wrong, but I believe that IIS
    will not return the contents of a ".inc" file to the
    browser.


    >-----Original Message-----
    >We keep our connectionstring and other global variables
    in a include file :
    >sitevariables.asp
    >
    >and then in our asp-page it's just this include
    ><!--include file="ourincludefolder/sitevariables.asp" -->
    >
    >You don't have to use session or application variable
    then.
    >
    >Dave Woestenborghs
    >ASP Developer
    >Belgium
    >
    >"Tom B" <shuckle@hotmail.com> wrote in message
    >news:%23FlGWCeUDHA.2364@TK2MSFTNGP09.phx.gbl...
    >> I think he was asking from a security perspective.
    >>
    >> I usually put my connection strings in global.asa as a
    Session variable.
    >> Keeping it in one spot makes it a lot easier if you
    change databases.
    >>
    >>
    >> "Ray at <%=sLocation%>" <myfirstname at lane34 dot com>
    wrote in message
    >> news:ODuqP5ZUDHA.1012@TK2MSFTNGP11.phx.gbl...
    >> > No, you shouldn't use a DSN. You should use OLEDB
    connection strings
    >and
    >> > create your connection when you need it. You can
    store the connection
    >> > string anywhere you'd like though.
    >> >
    >> > Get your OLE DB connection strings here:
    >> [url]http://www.connectionstrings.com/[/url]
    >> >
    >> > Set oADO = Server.CreateObject("adodb.connection")
    >> > oADO.Open YourOLEDBConnectionString
    >> >
    >> > Ray at home
    >> >
    >> > --
    >> > Will trade ASP help for SQL Server help
    >> >
    >> >
    >> > "William Johnson" <wbj4@cdc.gov> wrote in message
    >> > news:04a701c3515d$7d12fa70$a101280a@phx.gbl...
    >> > > I have different bits of advice about what is
    acceptable
    >> > > practice. I found a KB article (Q169377) advising
    to put
    >> > > the DSN string in the global.asa. Is this really
    ok and
    >> > > why?
    >> >
    >> >
    >>
    >>
    >
    >
    >.
    >
    John Beschler Guest

  6. #5

    Default Re: Best Security Practices for ASP against SQL Server

    "Chris Hohmann" <hohmannATyahooDOTcom> wrote in message
    news:uoN8oztUDHA.1812@TK2MSFTNGP11.phx.gbl...
    > As for securing the connection string, I've adopted the policy of
    using
    > a reference to a Data Link File as my connection string. i.e.:
    >
    > gConn = "FILE=C:\SomePathOutsideApplicationRoot\MyDatabase .udl"
    Sorry, that should be:

    gConn = "File Name=C:\SomePathOutsideApplicationRoot\MyDatabase. udl"


    Chris Hohmann Guest

Posting Permissions

  • You may not post new threads
  • You may 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