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. Connection Strings for Class Library Project

Connection Strings for Class Library Project

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netquestiondiscussionlearning
2 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.
  • R Offline
    R Offline
    robert110
    wrote on last edited by
    #1

    I have a solution that has 3 projects. One of them is serving as Class Library project (technically its a ASP.NET Web Application Project but it only contain classes). Where would be the best place to store all the connection strings? 1- GCL.config file? I could use ConfigurationManager class to access the connection strings or 2- Global.resource file? I could reference it directly GlobalResources.MyConnectionString.ToString(); Just trying to find out the best practice:) Thanks. Regards, Robert

    B 1 Reply Last reply
    0
    • R robert110

      I have a solution that has 3 projects. One of them is serving as Class Library project (technically its a ASP.NET Web Application Project but it only contain classes). Where would be the best place to store all the connection strings? 1- GCL.config file? I could use ConfigurationManager class to access the connection strings or 2- Global.resource file? I could reference it directly GlobalResources.MyConnectionString.ToString(); Just trying to find out the best practice:) Thanks. Regards, Robert

      B Offline
      B Offline
      Bassam Saoud
      wrote on last edited by
      #2

      I think the best and common practice is to store the connection string in the config file. You can also use Aspnet_setreg to store and encrypt credintails in the registery [^]

      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