Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2007

Tip: Looking for answers? Try searching our database.

My.Settings Application and User Scope Settings

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MATT - 28 Mar 2007 21:10 GMT
I am learning to use the Configuration and Application settings in VB.NET
(VS2005)

I understand the two different Scopes, Application and User, and that the
Application Scope settings are Read-Only.  These work great for what I need,
except for a few things.

First, for the User Settings, if you simply move the Executable from one
folder to another (I.e. from the desktop to a folder on the desktop), or even
rename it, the User Settings are lost.  Can't the app use the same config
file, even if the EXE name or location changes?

Second, It seems to make sense to me when it is suggested to save things
like Database connections as Application Settings.  What I don't understand
though, is that if this needs to change (i.e. a new server?), how would you
change this connection string?

Is there a better way to accomplish what i'm trying to do?

Thanks for any suggestions
MATT
Herfried K. Wagner [MVP] - 28 Mar 2007 23:14 GMT
"MATT" <MATT@discussions.microsoft.com> schrieb:
> I understand the two different Scopes, Application and User, and that the
> Application Scope settings are Read-Only.  These work great for what I
[quoted text clipped - 6 lines]
> rename it, the User Settings are lost.  Can't the app use the same config
> file, even if the EXE name or location changes?

.NET applications are typically deployed using a setup package in order to
prevent such problems.

> Second, It seems to make sense to me when it is suggested to save things
> like Database connections as Application Settings.  What I don't
> understand
> though, is that if this needs to change (i.e. a new server?), how would
> you
> change this connection string?

The administrator would change it directly in the config file.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.