Connection String Storage

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cfps.Christian

    #1

    Connection String Storage

    My shop currently has all of its ASP.NET pages using a singular
    web.config file which to my knowledge doesn't work when you start
    doing additional tasks like AJAX or Futures.

    I either need to know if there is a way to use a singular web.config
    and have it account for AJAX and Futures even if all the pages don't
    use it or find a way to store the connection strings in a centralized
    location (rather than in every site's web.config)

    I only had two ideas on the second portion and that was to create a
    dll with a direct config reference and have that do the work, or to
    create some kind of text file and reference it in the web.config.
  • Scott Roberts

    #2
    Re: Connection String Storage


    "cfps.Christian " <ge0193387@otc. eduwrote in message
    news:b1125267-f153-4e41-b96b-43986a0f5525@f4 7g2000hsd.googl egroups.com...
    My shop currently has all of its ASP.NET pages using a singular
    web.config file which to my knowledge doesn't work when you start
    doing additional tasks like AJAX or Futures.
    Don't know about "Futures", but you can certainly use one web.config for a
    site that contains both "plain" pages and AJAX-enabled pages. The AJAX
    settings in web.config are *additional* settings, they don't break anything
    on "plain" pages.
    I either need to know if there is a way to use a singular web.config
    and have it account for AJAX and Futures even if all the pages don't
    use it or find a way to store the connection strings in a centralized
    location (rather than in every site's web.config)
    Well, there's always machine.config. That's what we use.

    Comment

    • cfps.Christian

      #3
      Re: Connection String Storage

      I know we're just looking for maximum portability. We just want the
      ability to change the connection string in one place and have it
      change everywhere. They normally do includes but ASP.NET doesn't
      support the old style.

      Honestly I'd love to have them in a database but that defeats the
      purpose.

      Comment

      • Scott Roberts

        #4
        Re: Connection String Storage


        "cfps.Christian " <ge0193387@otc. eduwrote in message
        news:ac0f3282-65f9-45d3-9bc8-bea4046b1647@1g 2000hsl.googleg roups.com...
        >I know we're just looking for maximum portability. We just want the
        ability to change the connection string in one place and have it
        change everywhere. They normally do includes but ASP.NET doesn't
        support the old style.
        Well, machine.config is that place. It's also nice because you can move your
        web site from the Dev server to the QA server to the Production server
        without modifying web.config at all (the QA web server contains connection
        strings to the QA database, the Prod web server contains connection strings
        to the Prod database).
        Honestly I'd love to have them in a database but that defeats the
        purpose.
        Interesting that you say that. We store one connection string to the
        "Membership " database, then read the appropriate connection string from the
        Membership database depending on the user login. So we actually do store
        (some) connection strings in the database!

        Comment

        Working...