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. Database & SysAdmin
  3. Database
  4. Where should I store my connection string?

Where should I store my connection string?

Scheduled Pinned Locked Moved Database
questiondatabase
4 Posts 4 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.
  • H Offline
    H Offline
    Haim Yulzari
    wrote on last edited by
    #1

    I have to write a small application where a GUI accesses a DAL (Data Access Layer) through a web service. The GUI and the DAL are on two different computers. My question: where should I store the connection string so the DAL can get it and connect to the database? Thanks!

    A L D 3 Replies Last reply
    0
    • H Haim Yulzari

      I have to write a small application where a GUI accesses a DAL (Data Access Layer) through a web service. The GUI and the DAL are on two different computers. My question: where should I store the connection string so the DAL can get it and connect to the database? Thanks!

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      You should use an xml file to store the configuration of the connection string. The xml file may contain the path of encrypted password. The DAL should be able to build the connection string using these attributes.

      1 Reply Last reply
      0
      • H Haim Yulzari

        I have to write a small application where a GUI accesses a DAL (Data Access Layer) through a web service. The GUI and the DAL are on two different computers. My question: where should I store the connection string so the DAL can get it and connect to the database? Thanks!

        L Offline
        L Offline
        Luis Alonso Ramos
        wrote on last edited by
        #3

        If the DAL is on a web service (ASP.NET application), store it encrypted in web.config. -- LuisR


        Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!

        The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005

        1 Reply Last reply
        0
        • H Haim Yulzari

          I have to write a small application where a GUI accesses a DAL (Data Access Layer) through a web service. The GUI and the DAL are on two different computers. My question: where should I store the connection string so the DAL can get it and connect to the database? Thanks!

          D Offline
          D Offline
          Dr_X
          wrote on last edited by
          #4

          Per Microsoft about a year and a half ago, you should store you encrypted connection string in the registry of your web box. Here's the link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT11.asp[^] Michael I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious. Vince Lombardi (1913-1970)

          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