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. General Programming
  3. C#
  4. Set Password on sqlclient

Set Password on sqlclient

Scheduled Pinned Locked Moved C#
sysadminsecurityquestion
3 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.
  • N Offline
    N Offline
    NMiceli
    wrote on last edited by
    #1

    Hello, Is there any way to manipulate the password on a sqlclient connection? something like save the connection string in a config file and set the password later in the code, which will be read from an encrypted string. I don't want to use Windows Security because i don't know where the server will be and what clients will connect or if they are on a workgroup or domain. Any ideas will be appreciated. Thanks.

    G U 2 Replies Last reply
    0
    • N NMiceli

      Hello, Is there any way to manipulate the password on a sqlclient connection? something like save the connection string in a config file and set the password later in the code, which will be read from an encrypted string. I don't want to use Windows Security because i don't know where the server will be and what clients will connect or if they are on a workgroup or domain. Any ideas will be appreciated. Thanks.

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      You can do anything to the connection string before you use it to connect to the database, it's just an ordinary string. I suggest that you put a marker in the connection string, for an example a tag like [pwd], then replace that tag with the password. --- b { font-weight: normal; }

      1 Reply Last reply
      0
      • N NMiceli

        Hello, Is there any way to manipulate the password on a sqlclient connection? something like save the connection string in a config file and set the password later in the code, which will be read from an encrypted string. I don't want to use Windows Security because i don't know where the server will be and what clients will connect or if they are on a workgroup or domain. Any ideas will be appreciated. Thanks.

        U Offline
        U Offline
        Umut SIMSEK
        wrote on last edited by
        #3

        You can write it in a config file ofcourse. Then you can get from there to your connection string. But you know that it is not secure. Maybe it is not so important for you.. If it is important, you can enchrypt it. this means a lot of work :)

        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