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. Web Development
  3. ASP.NET
  4. DB access password

DB access password

Scheduled Pinned Locked Moved ASP.NET
databasearchitecturequestionworkspace
7 Posts 3 Posters 0 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.
  • C Offline
    C Offline
    Chrispie123
    wrote on last edited by
    #1

    Good Afternoon, Can someone please point to me how the architecture of a web site where database access is required should be used… I have a site that connects to a SQL express database and I have a provider setup in the web config file to access the database. If a user logs into the site they will use this username and password to access data and determine if it is a valid user. (This password is at this time unencrypted) If someone should get hold of this password they can have access to the database and do what they want to. Is this correct? Or should I do something else? Also what roles should this common user have? Thanks, Chris

    A 1 Reply Last reply
    0
    • C Chrispie123

      Good Afternoon, Can someone please point to me how the architecture of a web site where database access is required should be used… I have a site that connects to a SQL express database and I have a provider setup in the web config file to access the database. If a user logs into the site they will use this username and password to access data and determine if it is a valid user. (This password is at this time unencrypted) If someone should get hold of this password they can have access to the database and do what they want to. Is this correct? Or should I do something else? Also what roles should this common user have? Thanks, Chris

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      Chris Tiaan wrote:

      If a user logs into the site they will use this username and password to access data

      Are you talking about the user that is registered into the database. Means are they just a single record from Users table of the Database or they are the actual user which is used to connect to the database. Generally, uid and password can be protected using SSL connection. Yes if you send password unencrypted, it might be exposed to others. But if they are not sensitive enough, it is unnecessary to do Encryption using SSL. For our general websites , We take uid and password and check with db using the connection string(which has UID and password) stored in the server. ;)

      Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


      My Latest Articles-->** Simplify Code Using NDepend
      Basics of Bing Search API using .NET
      Microsoft Bing MAP using Javascript

      C 1 Reply Last reply
      0
      • A Abhishek Sur

        Chris Tiaan wrote:

        If a user logs into the site they will use this username and password to access data

        Are you talking about the user that is registered into the database. Means are they just a single record from Users table of the Database or they are the actual user which is used to connect to the database. Generally, uid and password can be protected using SSL connection. Yes if you send password unencrypted, it might be exposed to others. But if they are not sensitive enough, it is unnecessary to do Encryption using SSL. For our general websites , We take uid and password and check with db using the connection string(which has UID and password) stored in the server. ;)

        Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


        My Latest Articles-->** Simplify Code Using NDepend
        Basics of Bing Search API using .NET
        Microsoft Bing MAP using Javascript

        C Offline
        C Offline
        Chrispie123
        wrote on last edited by
        #3

        Hi Abhishek Thanks for your reply. Currently I have the SA user in the config file for testing. ...Which earns me a BAD award :( ...but it is only on my local PC. :) If I were to create a new user to use what rights and roles should I grant the user? Thanks for your reply, Chris

        A 1 Reply Last reply
        0
        • C Chrispie123

          Hi Abhishek Thanks for your reply. Currently I have the SA user in the config file for testing. ...Which earns me a BAD award :( ...but it is only on my local PC. :) If I were to create a new user to use what rights and roles should I grant the user? Thanks for your reply, Chris

          A Offline
          A Offline
          Abhishek Sur
          wrote on last edited by
          #4

          Chris Tiaan wrote:

          If I were to create a new user to use what rights and roles should I grant the user?

          How can I answer this.. . It totally depends on your requirement. If you make db_owner, it can do anything. :-D

          Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


          My Latest Articles-->** Simplify Code Using NDepend
          Basics of Bing Search API using .NET
          Microsoft Bing MAP using Javascript

          C 1 Reply Last reply
          0
          • A Abhishek Sur

            Chris Tiaan wrote:

            If I were to create a new user to use what rights and roles should I grant the user?

            How can I answer this.. . It totally depends on your requirement. If you make db_owner, it can do anything. :-D

            Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


            My Latest Articles-->** Simplify Code Using NDepend
            Basics of Bing Search API using .NET
            Microsoft Bing MAP using Javascript

            C Offline
            C Offline
            Chrispie123
            wrote on last edited by
            #5

            Hi What I dont understand is if I were to make it the DB owner. What prevents someone from getting that login and password onto my database and change data? can the config file be access from the outside word? Many Thanks, Chris

            B A 2 Replies Last reply
            0
            • C Chrispie123

              Hi What I dont understand is if I were to make it the DB owner. What prevents someone from getting that login and password onto my database and change data? can the config file be access from the outside word? Many Thanks, Chris

              B Offline
              B Offline
              Blikkies
              wrote on last edited by
              #6

              Looks like you new to ASP. ASP is server side, code including web.config is only visible to the server, no client can access those files.

              1 Reply Last reply
              0
              • C Chrispie123

                Hi What I dont understand is if I were to make it the DB owner. What prevents someone from getting that login and password onto my database and change data? can the config file be access from the outside word? Many Thanks, Chris

                A Offline
                A Offline
                Abhishek Sur
                wrote on last edited by
                #7

                I dont think from ASP.NET, anyone can get the UID and password as it is secure and cant be called. If you are unsure that someone else who have access to the server can see it through file system, you can also make use of encryption of web.config. Now regarding the role, you can either make it db_owner or sys_admin based on the requirement. ;)

                Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


                My Latest Articles-->** Simplify Code Using NDepend
                Basics of Bing Search API using .NET
                Microsoft Bing MAP using Javascript

                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