.NET Save Configuration Settings To PerUserRoaming Location?
Dec 6, 2010
I have a VS2010 solution with a Settings.settings file. The user settings are saved to the Local Settings folder and this is a problem as these settings do not roam.Currently the settings file is saved automatically to:
Dim config_initial As System.Configuration.Configuration = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.PerUserRoamingAndLocal)
[code].....
View 1 Replies
ADVERTISEMENT
Sep 9, 2011
where is the configuration of vb.net? because I Need to set a User for the checker Role before go to verifier .. my boss told me if i will set it to config or i will hardcode it to set a new checker
View 1 Replies
Jun 22, 2010
we have several applications in Vb.Net using the built in log system (My.Log) to write log information. Until now this system was configured by the application.config file before execution but now we want to let the user to choose some options.
Is there a way that does not requires to parse the XML file and process it? Is there available something like My.Settings that will do the dirty job done?
An example would be to be able to modify the DefaultSwitch value from Verbose to Warning or changing a property of the FileLog like the maxFiles attribute:
<switches>
<add name="DefaultSwitch" value="Verbose" />
</switches>
<sharedListeners>
[Code]....
View 1 Replies
Aug 23, 2011
Coding in VB.net in VS 2010. I have:Imports System.Configuration and I added a reference to System.Configuration.
When
**MsgBox(ConfigurationManager.AppSettings("sDBName").ToString)**
[code]....
View 2 Replies
Sep 8, 2011
Every .NET project I've worked on uses an app.config file for its configuration. Fair enough. "is there a better way?" (in the spirit of continual learning of course)I guess my specific questions are:
Does it matter either way if I use app.config or settings file?Are there any scenarios where settings files should not be used e.g web sites where you should use a web.config instead?Other than not having to edit xml, are there any other benefits gained by using settings instead of app.config, e.g. its easier to deploy or maintain apps etc.
Clarification: I'll put this question another way: Can I completely ignore app.config files if I want to and keep all the configuration in a settings.cs file and interact with configuration via the designer only?
View 2 Replies
Apr 6, 2011
I am writing a program to automatically switch my proxy address based on the network I am connected to.
I have so far got everything to work except the part that I have highlighted below.
Is there any way to change the automatic configuration script and the automatically detect settings in code?
The solution can be either P/Invoke registry editing. I just need something that works.
View 2 Replies
Jun 22, 2010
Is anyone aware of a way that I can set application (or user) level settings in a .Net application that are conditional on the applications current development mode? IE: Debug/Release To be more specific, I have a url reference to my webservices held in my application settings. During release mode I would like those settings to point to [URL] during debug mode I would love those settings to be [URL]
View 2 Replies
Mar 20, 2011
I am developing an application, and i need to store some configuration settings, with time, i will need to add some more configuration settings. Am thinking of three alternative to implement that will me easy to access without much coding and efficient sqlite, xml, and application configuration file..But am concerned about security, because some personal data will be saved together.
View 2 Replies
Jun 27, 2011
I have a custom control that as a custom property. The property has several preset values to chose from a drop down. The control can be added to a form. The property can be viewed and set in the properties box in the IDE. It all works fine.
Here's the problem: I can create new versions and recompile the control and/or the application without the properties preset value being lost as long as I do it in Debug mode. However, once I try to recompile in Release mode the custom property values predefined setting is lost. I first thought it was something with going from debug mode to release mode. But it seems to be ANY time I recompile in Release mode the custom property values are lost. Is this a quirk in VS that needs a configuration setting, etc. to get around it?
View 3 Replies
Jan 14, 2009
I just wondered if you can or can't save arrays using the settings system object. There seems to be no way of entering it at designtime. It seems implied you cannot create new user settings.subobjects at runtime. I'm looking to find the easiest way to save a populated array of PictureBox's. If the only way is a self/custom made/managed .ini file then I need to know so i can start on that but I was hoping to use some of all this phaff in the new frameworks usefully.
View 3 Replies
Feb 8, 2008
i have created a user setting named 'setmeup' as string, scope = user, value = "magical meow meow!".in my code i access it and assign it a new value like this...my.settings.setmeup = "howdy cowboy!"my.settings.save()application.restart()when the application restarts, i expect the my.settings.setmeup = "howdy cowboy!" but when i check its contents its still "magical meow meow!".but when i use application.exit() instead of application.restart() and manually restart the program, my.settings.setmeup = "howdy cowboy!" which is correct.what must i do? i want to use application.restart() because i don't want the users to double-click the icon again to start the program. i want the program to restart automatically.
View 2 Replies
Mar 25, 2011
I'm working with an Treeview and i'm new at it and i have 2 questions.
1. How can i save the treeview items, to settings (my.settings.history)
2. How can i save the treeview items as an TXT or XML file or another exception.
View 13 Replies
May 23, 2010
I have an application that has a part of it that modifies several windows services. When the form loads it checks the registry for the current status of the services.
What I would like to do is have it so that the application takes a snapshot of all the defined services when it is first installed and stores the defined settings for each of them. This way the services can be restored at a later time to there original settines. I would also like to make it so that a custom settings file can be created so that this custom configuration could be loaded which contains changes. The result would be the first file made would allow everything to be reset prior to any changes the second file would contain all the setting changes.
View 20 Replies
Oct 17, 2009
I'm trying to make it so the the images will save to the folder that you selected in the textbox1.text from the folderbrowser this is the code's I have tried
[Code]...
View 1 Replies
Jun 25, 2011
on my program i have an activation in it and in order to activate the program you need to enter a code that is stored in the settings. so i was looking through my computer and i found the programs config file. and so I opened it and i found all of the codes for the activation. I need to find out how to make the file so the user doesn't have access to it and then how to move it to a more hidden place in the C: drive.
View 3 Replies
Oct 24, 2011
New to these forums but have been a lurker for a while. I searched through some "multiple monitors" threads but didn't find anything that fit my current issue, so I figured I'd pose it in a new thread. We have users with 4 monitor setups that are very particular about their screen settings. When we have to replace a PC for whatever reason, it is always a hassle getting their screen configurations the way they were prior to the switch. Is it possible to create a small VB app that will scan their current configuration, save a "settings" file, and re-apply the settings on the new PC? What I mean by configuration is screen resolution, setting the primary monitor, etc. Theoretically this sounds like it can be done, but I wanted some opinions on it.
View 1 Replies
Jan 10, 2011
I wanted to know is it posible to change My.Settings location.. for example, not in user folder (dont remember in witch folder, but i know it was in some users folder..), but save in application folder?Cos i write programs portable, so they work if the folder with my program is moved even to different PC..It would be a great if i could use my.settings and store in the application path..Cos i have tried to save in registry, xml file, ini file, and they all are pain in the a*s..
View 4 Replies
Sep 4, 2011
Im making an application that uses Google Maps Mobile (maps.google.com/m) and it uses a location sensor to give you results. How can i set that up? I would also like to try it with Google Buzz Mobile (m.google.com/app/buzz).
Dustin_K "There are 10 types of people in the world: those who understand binary and those who don't."
View 3 Replies
Jun 8, 2010
how i can save user settings in vb.net
i have a project with different buttons when a user clicks a button the image of PictureBox1 will change.
i want to save this image that the user has chosen after he closes the application, so it will be displayed in PictureBox1 when loaded.
i am using Microsoft Visual Basic 2010 Express
the languge is VB
View 5 Replies
Sep 22, 2011
I have a VB.NET solution built in Visual Studio 2010. It consists of a class project, a service, and a setup project. I have successfully created a setup, and run the setup from the "Release" directory of the setup project (outside of Visual Studio). It installed the service (on the same machine as where the project is), and the service seems to be running fine. The service executable is installed in a directory under c:program files (x86) along with some DLL's it is dependent of. The service (actually the class project I mentioned above) uses some settings from My.Settings. As far as I know these settings are stored in a app.config file in the project directory, as well as in a settings.settings file in the My Project directory under the project directory.
Neither of these files are installed by the installer. But the service can only run if it can read the settings. So where does my service get these settings from? To check if it still reads the settings from the VS project directory, I have temporarily renamed that directory, but that didn't affect the correct operation of the service.
View 3 Replies
Dec 17, 2011
Using either one by itself works fine but if I use both then it behaves strange.It will Maximize just fine but when I click the Maximize button again to take it back to the original size it resizes the window to the original but then immediately resizes it back to the smaller size location. So I end up with a window whose upper left corner is where it belongs but the window size is the same as if it was maximized.
View 7 Replies
Mar 26, 2009
I have a class library (Named ADI), that needs some configuration settings from the project using it (like connectionstring, filesystem locations etc).
I want to define these settings in my Windows Forms/Web Projects App.Config or Web.Config, like other settings.
Here is part of my app.config for my windows forms application:
<applicationSettings>
<PhotoImportRobot.My.MySettings>
<setting name="ADIImageRoot" serializeAs="String">
[Code]....
View 3 Replies
Jun 4, 2010
I would like to be able to specify exactly where the My.Settings file gets saved. It bugs me how it gets saved off in the middle of appsettings nowhere, and I would prefer it gets saved where the executable is. If anyone knows how to do this, that would be great. (P.S; I'm using VB.Net.)
View 14 Replies
Dec 21, 2010
When I save settings for an application using My.Settings.Save it saves it in %AppData%LocalCompanyname. Because I don't want my app to be installed and I want it to be a just .exe file, and it leaves some files on that computer. I like it to be in my apps location. Can I change that default location?
View 4 Replies
Sep 27, 2009
I set up some application settings for checkboxes on an app and then decided to remove them. When I set the Application Settings to (none) in the designer and restarted the app, the checkbox constantly checks and unchecks itself. I completely remade the app and removed the file that is used to store my.settings in the Local folder of the user's appdata profile. I also made sure to uncheck the "save my.settings" on shutdown.
View 6 Replies
May 18, 2009
I am just not happy with the fact that the user.config file gtets saved in the user's account folder. Is there a way to save it in the Application's Startup Folder instead? I couldn't find any configuration properties within the PROJECT PROPERTIES which would let me change the file location.
View 2 Replies
Nov 16, 2010
Receive 'ConfigurationManager' is not a member of 'Configuration' in VS2008.I read all of the topics in the forum about this error Tried adding areference to System.Configuration.dll to the project and an "Imports System.Configuration" to the vb file.Still get an error
View 7 Replies
Apr 14, 2008
I'm trying to save a collection of key/value settings in my application's "user settings" (they're column widths), but while I see no errors, when I run the code (in the IDE) my collection in "My.Settings" is always nothing at startup. I do a "My.Settings.Save" when the application exits, and barring the "serializers not found" errors in the IDE, no other errors occur. When I run my application as an exe, it behaves the same way..
View 7 Replies
Oct 23, 2011
I have an app that will need a file repository located in a subfolder in my program's directory. For example: c:program files (x86)myapplicationmyfiles But, I need to allow the user to be able to change the location of this subfolder if they wish to store them on a network drive etc..
[Code]...
View 4 Replies
Dec 25, 2011
how to save data (for example some text that user type [as password etc]) and save that password on same location where is application. After saving I want to have also Load option so we can load saved data.
View 7 Replies