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. About Connection string

About Connection string

Scheduled Pinned Locked Moved ASP.NET
businesstutorialquestion
7 Posts 6 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.
  • D Offline
    D Offline
    devboycpp
    wrote on last edited by
    #1

    Is it secure to place connection string in our assembly ? for example store it in a variable in our business class .or its better to place it in web.config file. tell me why ?

    _ N S I L 5 Replies Last reply
    0
    • D devboycpp

      Is it secure to place connection string in our assembly ? for example store it in a variable in our business class .or its better to place it in web.config file. tell me why ?

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      Normally it is good to put the connection string in web.config file.

      Best Regards, Apurva Kaushal

      N 1 Reply Last reply
      0
      • D devboycpp

        Is it secure to place connection string in our assembly ? for example store it in a variable in our business class .or its better to place it in web.config file. tell me why ?

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        The web.config file is plain text. An assembly is compiled. Which would be easier to read? You can encrypt the config file. You can also use a tool, such as ILdasm, to view the inards of an assembly, but this is a little more difficult than simply opening a plain text xml file.


        only two letters away from being an asset

        1 Reply Last reply
        0
        • _ _AK_

          Normally it is good to put the connection string in web.config file.

          Best Regards, Apurva Kaushal

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          Not normally. There are valid and useful reasons for not storing it in the config file.


          only two letters away from being an asset

          1 Reply Last reply
          0
          • D devboycpp

            Is it secure to place connection string in our assembly ? for example store it in a variable in our business class .or its better to place it in web.config file. tell me why ?

            S Offline
            S Offline
            Sathesh Sakthivel
            wrote on last edited by
            #5

            Hi, The connection string should be only on the web.config file. use CipherData class so that we can encrypt it. then it will be very much secure. Happy Coding

            With Regards Satips

            1 Reply Last reply
            0
            • D devboycpp

              Is it secure to place connection string in our assembly ? for example store it in a variable in our business class .or its better to place it in web.config file. tell me why ?

              I Offline
              I Offline
              immori
              wrote on last edited by
              #6

              Ofcurse its better to save in web.config. because if you deside to change it , you have not to recompile your app and upload dll file...!

              1 Reply Last reply
              0
              • D devboycpp

                Is it secure to place connection string in our assembly ? for example store it in a variable in our business class .or its better to place it in web.config file. tell me why ?

                L Offline
                L Offline
                Leon Segal
                wrote on last edited by
                #7

                Storing it in your business layer should be the last resort, as will require recompiling and redeploying every time you need to change it. Other options are: - store in web.config as clear text - store in web.config as encrypted string (ASP.NET v2 feature) - store encrypted in registry (current server) with registry keyname stored in web.config It all depends on how secure you want it to be (who else has access to your web.config file?) and your deployment process (manual/automated). .leON.

                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