473,406 Members | 2,698 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,406 software developers and data experts.

connectionstring in web.config

Is there a way to grab the connectionstring value from the web.config
in another project? I created a DataAccess layer to store my typed
dataset and it automatically created settings.settings and app.config.
The settings.settings grab the connectionstring from app.config.

The problem I have is that when I publish a website that accesses the
dataset, it imports the DataAccess.dll into its bin folder. From here,
it's impossible for me to change the connectionstring since the
app.config does not get added anywhere in the website folder.

If I can somehow get the DataAccess layer to use my website's
web.config to grab the connectionstring, it'd be much helpful.

Thanks,
Gina.

Feb 6 '07 #1
1 1416
Why not to keed your DB specific settings into separate config?!

--
WBR, Michael Nemtsev [C# MVP].
Blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"gi****@gmail.com" wrote:
Is there a way to grab the connectionstring value from the web.config
in another project? I created a DataAccess layer to store my typed
dataset and it automatically created settings.settings and app.config.
The settings.settings grab the connectionstring from app.config.

The problem I have is that when I publish a website that accesses the
dataset, it imports the DataAccess.dll into its bin folder. From here,
it's impossible for me to change the connectionstring since the
app.config does not get added anywhere in the website folder.

If I can somehow get the DataAccess layer to use my website's
web.config to grab the connectionstring, it'd be much helpful.

Thanks,
Gina.

Feb 6 '07 #2

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

Similar topics

4
by: Devante | last post by:
Hi, I am fairly new to ASP.NET and have been working on a web form that will allow a user to upload images to a database. I have found a sample web form that I have been trying to get working,...
2
by: G. Dean Blake | last post by:
We currently distribute a web application to serveral servers for a customer. We have been putting the connection string in our web.config file under <appSettings> <add...
4
by: Devante | last post by:
Hi, I am fairly new to ASP.NET and have been working on a web form that will allow a user to upload images to a database. I have found a sample web form that I have been trying to get working,...
3
by: Jim Andersen | last post by:
Hi, I would appreciate if someone could explain this behaviour, and maybe offer a better solution. I have been working with the GridView control. And SqlDataSource. It works great if I do:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.