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. how to encrypt the database connection string in web.config file

how to encrypt the database connection string in web.config file

Scheduled Pinned Locked Moved ASP.NET
databasetutorial
5 Posts 2 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.
  • J Offline
    J Offline
    jagan123
    wrote on last edited by
    #1

    iam writting the database connection string in appsettings of a weg.config file like this < add key="my connection" value="Data Source=abcd;UID=ab1;Password=ab2;"/> but this should not be visible to the user in the same way how this can be encrypted.

    S 1 Reply Last reply
    0
    • J jagan123

      iam writting the database connection string in appsettings of a weg.config file like this < add key="my connection" value="Data Source=abcd;UID=ab1;Password=ab2;"/> but this should not be visible to the user in the same way how this can be encrypted.

      S Offline
      S Offline
      Sun Rays
      wrote on last edited by
      #2

      Hey, u can try this link[^]

      Thanks, Sun Rays To get something you must have to try once. My Articles

      J 1 Reply Last reply
      0
      • S Sun Rays

        Hey, u can try this link[^]

        Thanks, Sun Rays To get something you must have to try once. My Articles

        J Offline
        J Offline
        jagan123
        wrote on last edited by
        #3

        DataProtectionConfigurationProvider by using this the web.config appsettings are automatically converted to some code ..is this code is genrated same for all applications ....now where i have to write the encryptmethod of web.config and where i have to decript ...when i decript again i have to call encrypt....

        S 1 Reply Last reply
        0
        • J jagan123

          DataProtectionConfigurationProvider by using this the web.config appsettings are automatically converted to some code ..is this code is genrated same for all applications ....now where i have to write the encryptmethod of web.config and where i have to decript ...when i decript again i have to call encrypt....

          S Offline
          S Offline
          Sun Rays
          wrote on last edited by
          #4

          Hey, check it and implement it. link[^]

          Thanks, Sun Rays To get something you must have to try once. My Articles

          J 1 Reply Last reply
          0
          • S Sun Rays

            Hey, check it and implement it. link[^]

            Thanks, Sun Rays To get something you must have to try once. My Articles

            J Offline
            J Offline
            jagan123
            wrote on last edited by
            #5

            Imports System.Configuration Imports System.Web.Configuration sir even thoug iam importing these two namespaces but iam getting the errors WebConfigurationManager.OpenWebConfiguration not declared error is comming wat the problem in it sir

            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