|
John Simmons / outlaw programmer wrote: What could I be doing wrong?
User settings gets saved under the user folder (god knows where), and gets picked up from there if different from the app.config. Note app.config is never changed.
xacc.ideIronScheme a R5RS-compliant Scheme on the DLR
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
|
I'll look there tonite.
However, I don't think it's working because I can't appear to retrieve data I "save"d.
Why does everything in .net have to be so convoluted?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
After a quick look on my system I find the settings files in the following location
C:\Documents and Settings\username\Local Settings\Application Data\companyname\applicationame.exe_Url_4jxa32l1jl5ig3yszvzaymm2fpoq5w4k\1.0.0.0\user.config
where
companyname is that set in the company field of the assembly information
You may end up with several versions of the config file in which case they will have different _Url_4jxa32l1j.... tagged on the end of the exe name.
Alan.
|
|
|
|
|
Those pesky autochanging version numbers always cause me problems.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
John, settings do work exactly like you would expect, but there is apparently something throwing a wrench into it.
Few things to try:
Properties.Settings.Default.MySetting = newValue;
Properties.Settings.Default.Save();
Foo loadedValue = Properties.Settings.Default.MySetting; Does loadedValue == newValue in that case?
Another thing to try, if you save a setting as above, then restart your application (don't rebuild it, just restart it), does your saved setting stick?
If the above 2 things work, try saving a setting, rebuilding your application, then loading that setting. If the loaded setting isn't what you saved, then I'd check your AssemblyInfo.cs (under Properties project in your folder) and verify the version numbers aren't auto-incremented each build, e.g. 1.0.*
|
|
|
|
|
I'll bet it's the version number thing. I'll check it tonight. Thanks you magnificent human being (in case it works), and you worthless bastard (if it doesn't work).
BTW, I don't recall manually editing the assemblyinfo.cs file, but I'll check anyway.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I just tried a simple app here at work (running Vista), and it appears to work fine. I'm running vista here, and it put the file into
c:\users\me\appdata\local\companyname\appname.exe_Url_some-huge-ass-hash\1.0.0.0\user.config
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I have no idea if this helps, but a few weeks ago I was toying around with a WPF application on XP. I would save my settings, but the next time I launched the program, it didn't see my new setting. It was like it was never saved in the first place.
I thought it was a limitation of WPF, but I built a test WPF app and it worked fine there. I checked and made sure the auto-increment version number wasn't set, tried all kinds of things. In the end, I just created a new C# project and copied the files over to that one, the settings magically worked. It was as if that particular C# project's settings were cursed. In 6 years of .NET development, I had never seen an unexplainable case like this. Maybe this is what you're experiencing.
|
|
|
|
|
Every time i make a program and send it to a freind or relative, they tell me it doesn't work.
I upload it to my other computer and it doesn't work on there either, how do i fix this problem?
|
|
|
|
|
Just as a guess, I would suspect that they don't have the .NET framework installed. There is a redistributable available for each different version of the framework that allows you to install it for them.
|
|
|
|
|
You would think after 3.5 versions, the power that be will change the general exception message box to something like ".NET Framework can not be found............"
|
|
|
|
|
C# Beginner Nick wrote: it doesn't work
meaning...
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Typically a user says this to helpdesk.
Since you categorize yourself as a developer, please notify "helpdesk" (meaning us) what the error is, what you have done etc... instead of telling us "it doesn't work".
the more info we get, the better chance for you that anyone will know a solution...
good luck.
V.
If I don't see you in this world, I'll see you in the next one... And don't be late. (Jimi Hendrix)
|
|
|
|
|
If no one has mentioned this to you before, please give your message titles some meaning.
|
|
|
|
|
Instead of just building the executable; go to the Propject > Properties > Publish page.
Make sure that you have .net framework selected as a prerequisite and that you are deploying to the filesystem rather than a webserver, turn off updates and then click "Publish Now".
You should now have a bunch of files in your chosen directory that can install your app and its prereqs for you. If you zip this lot up and send it to people then the thing will probably work.
Of course given the explanation of the problem i may be way off the mark here but that's worth a try.
Russell
|
|
|
|
|
Then stop sending them programs.
|
|
|
|
|
I had selected a single row from a table using where condition.
when i populated the dataset's values to string variable it shows error.
I checked for rowcount, it shows as 1.
My code::.....
code
strGroupName = locDts.Tables[0].Rows[1].ItemArray[0].ToString();
strGroupId = locDts.Tables[0].Rows[1].ItemArray[1].ToString();
code
it prompts an error as"There is no row at position 1"
pls suggest me.
senthil
senthil
|
|
|
|
|
Remember that this is zero based, so a row count of 1 means that the row is actually 0. Hence, locDts.Tables[0].Rows[0].ItemArray[0].ToString();
|
|
|
|
|
I had selected a single row from a table using where condition.
when i populated the dataset's values to string variable it shows error.
I checked for rowcount, it shows as 1.
My code::.....
strGroupName = locDts.Tables[0].Rows[1].ItemArray[0].ToString();
strGroupId = locDts.Tables[0].Rows[1].ItemArray[1].ToString();
it prompts an error as"There is no row at position 1"
pls suggest me.
senthil
senthil
|
|
|
|
|
How to people go about obscuring the stuff in a client side configuration file?
I thought about crypto but then I'd have to have the key lying around somewhere.
It's for an app that will be set up by an administrator and then use by people who shouldn't be able to change these settings or view passwords contained in the config file. I'm not expecting a very high level of attack against the application.
Would it make sense to use manifest data such as ExeName and culture to create a key? Is there a unique identifier for a workstation that i could use to tie the encrypt to the machine it was configured on?
If anyone has had a similar issue in the past i'd love to hear their experiences.
Thanks
Russell
|
|
|
|
|
There is a built-in method for doing machine based encryption. Search the msdn.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
thank you,
Isn't it incredible that the msdn search only works if you type in exactly the right expression. I look forward to the the day when i see "Search powered by Google" at the top of those pages
Russell
|
|
|
|
|
Hey guys,
I m trying to emport some data from excel using Oledb.
wen i use this connectionstring everything works fine:
string sConnectionString = @" Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Book1.xls;Extended Properties=""Excel 8.0;HDR=YES;"" ";
Bud wen i try to pass the data source as parameter like this:
string sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;"+"Data Source="+ datasource+";"+"Extended Properties= Excel 8.0;"+"HDR=YES;";
then i get the error:
Could not find installable ISAM.
any idea how to pass the data source parameter in this case?
|
|
|
|
|
Hi all,
I have a contextmenu strip with a combobox in it. After the user selects an item the context menu still remains. How can I 'hide' the context menu strip after a selection was made from the combobox within the context menu?
Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|