473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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.
Feb 4 '08 #1
3 1535

"cfps.Christian" <ge*******@otc.eduwrote in message
news:b1**********************************@f47g2000 hsd.googlegroups.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.

Feb 4 '08 #2
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.

Feb 4 '08 #3

"cfps.Christian" <ge*******@otc.eduwrote in message
news:ac**********************************@1g2000hs l.googlegroups.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!

Feb 4 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: H | last post by:
This is a question that has haunted me for quite some time. if you build a 4 tier database application where the 4th tier is the database server (MS SQL 2000), where do you build the connection...
4
by: Locusta | last post by:
Hello, I have been struggeling for replacing a string in a string. The snippet from the program below replaces the <, & and > with the XML equivalent values. In the program, I allocate space...
18
by: WStoreyII | last post by:
I am making a asp page that will run on my computer by iis. But the problem is the database in on a web server. I can not seem to get the connection to work for it though here his the connection...
32
by: santosh | last post by:
In following code char str = "asdf" ; str = 's' ; is possible. But char *str = "asdf" ; str = 's' ; is an run-time error. What i understand is *str = "asdf" is stored in Read-only-Memory....
37
by: sam44 | last post by:
Hi, At startup the user log on and chooses the name of a client from a dropdownlist, which then changes dynamically the connection string (the name of the client indicates which database to use)....
2
by: samadams_2006 | last post by:
Hello, I have a problem that I'm hoping someone will be able to help me resolve. 1) I have a C# Web Site in which I connect to the database: "Install Microsoft SQL Server 2005 Express...
5
by: | last post by:
Hi, I'm having difficulty connecting my .NET web app to my SQL2000 database via the DAAB. I'm using VS2003 with .NET 1.1. I'm currently trying names such as Initial Catalog, Data Source, User...
1
by: sujatha k | last post by:
?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="enterpriselibrary.configurationSettings" type="System.Configuration.IgnoreSectionHandler, System,...
0
by: sujatha k | last post by:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections <sectionname="enterpriselibrary.configurationSettings" type="System.Configuration.IgnoreSectionHandler, System,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.