473,386 Members | 1,736 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.

Settings.settings in .NET 2005

Hello,

I've just upgraded from .NET 2003 to 2005.
I was using an app.config file to set my connections.

I see that this must have automatically been changed when .NET converted my
solution from 2003 to 2005.

Do I use both the app.config file and the settings.settings file?
I see that code has been added to the top of my app.config file, a
<connectionStrings> section, in addition to my <apps setting> section that I
previously used.

I'm working on a laptop, with SQL Server Express, when I release my
solution, I use a different app.config key that specifies a connection on a
network elsewhere.

How do I deal with this using my.settings.settings?

I'm a bit confused.....

TIA.
Amber
Nov 22 '05 #1
1 1014
Go with your app.config file and add your connection strings in the
connectionStrings section. There's more info and links to other topics
in
http://msdn2.microsoft.com/en-us/lib...US,VS.80).aspx. A
different solution might be to use the SqlConnectionStringBuilder to
avoid exposing connection strings entirely. See
http://msdn2.microsoft.com/en-us/lib...ngbuilder.aspx
and http://msdn2.microsoft.com/en-us/library/ms254947.aspx for more
info. You can also now edit configuration files at runtime using the
new classes in System.Configuration as well as encrypt them using
protected configuration.

--Mary

On Mon, 14 Nov 2005 11:31:06 -0800, "amber"
<am***@discussions.microsoft.com> wrote:
Hello,

I've just upgraded from .NET 2003 to 2005.
I was using an app.config file to set my connections.

I see that this must have automatically been changed when .NET converted my
solution from 2003 to 2005.

Do I use both the app.config file and the settings.settings file?
I see that code has been added to the top of my app.config file, a
<connectionStrings> section, in addition to my <apps setting> section that I
previously used.

I'm working on a laptop, with SQL Server Express, when I release my
solution, I use a different app.config key that specifies a connection on a
network elsewhere.

How do I deal with this using my.settings.settings?

I'm a bit confused.....

TIA.
Amber

Nov 22 '05 #2

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

Similar topics

7
by: Michel | last post by:
Hi, I am not able to see the Asp.Net Tab in IIS 5.1. I have installed Visual Studio 2005 on a Windows Xp SP2. When I following the step from the following url, I can not see this tab. I am logged...
4
by: Sai | last post by:
Hi, I am using VSTO 2005 Beta for building an excel application. I added application configuration file to the project (app.config) and it has the following section in it. <configuration>...
7
by: Fred Flintstone | last post by:
I'm writing a VB.Net windows forms application. This line of code: Personal.EffectiveDate = GridRow2.Cells("New Value").Value.ToString.Trim Fails with this error: Cast from string...
0
by: SpotNet | last post by:
Hello News Group, I want to set output\settings folders for Visual Studio .NET 2005 (Standard) to common locations. Ideally I want to have the following D:\Documents and Settings\<My User Goes...
5
by: Andy | last post by:
I need to write a VB.NET WinForms app. For this purpose I need to keep some settings of the application, like many other Windows applications do. The most obvious solution is to store settings in...
4
by: RedHair | last post by:
I developed a Win form with VS.NET 2005 + .NET 2.0 in C# There are some application settings are "User" scope and stored in xxx.settings, I can access them via Settings class and changethem with...
2
by: Robert Dufour | last post by:
Its easyb to change user leve settings but how do you change application level settings in code. Apparently it seems it can't be done. Duhhh. Anybody manage a workaround? Thanks for any help....
0
by: aboutjav.com | last post by:
Hi, I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property ...
18
by: Mel | last post by:
What is the best method to achieve this (I am relatively new to vb.net)? Should I use an ini file or the registry? Is there another option available in vb.net that is the preferred way? This...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.