Crazy ConfigurationManager

This seems odd ...

While debugging my application in VS2008, I can successfully retrieve values 
from my configuration file doing the following:

string bla = ConfigurationManager.AppSettings["myValue"];

I can also successfully save to the config file doing the following:

Configuration c = 
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
c.AppSettings.Settings.Remove("myValue");
c.AppSettings.Settings.Add("myValue", "ItsActualValue");
c.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");

If I go into my debug directory on my file system and check my exe config 
file, I can actually see that these settings have successfully been written 
to the config file.

Here's the weird part:
When I'm finished debugging my app, I stop it by hitting (shift + F5).  When 
I do that, my exe config file somehow reverts back to the original state in 
which these settings did not exist in the config file.

WTH?!?



0
8/8/2008 9:33:54 PM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
765 Views

Similar Articles

[PageSpeed] 43

Reply:

Similar Artilces:

Null Object Error. Driving me crazy. Please, help me out ...
Hello, I am having a problem with a C# class for hours and I cannot find the problem. Basically a Web Application works fine but when Google Verify, Spider, W3C validation try to access the page a 500 error is generated. I was able to identify where the error is and created a simple web application: http://www.flyondreams.net/ Note: If you access it directly everything works fine. I then used Rex Swain's HTTP Viewer which shows what error occurs when the page is accessed: http://www.rexswain.com/cgi-bin/httpview.cgi And displays the stack ... Just submit with http://...

List box questions
Hello, I have a table that contains document metadata for a set of reference documents. I have a form that displays the metadata in separate fields. On the form I also have a list box that only lists the document titles. When the user clicks on a title, the detailed document metadata gets displayed on the form. That all works wonderfully. My problems: 1. When the form first opens, the document details that are displayed are NOT from the first document (sorted by title, even though I have set it to be). 2. The list box is nicely ordered by title, as desired, but there is not select...

VLOOKUP driving me crazy
Hi all - I have a VLOOKUP formula that is really bugging me. Instead o reading accross it seems to be reading down. The formular is =VLOOKUP(A1,OCU_VCU!W1:X20,1) I cant see whats wrong with it - ive used VLOOKUP so much in othe projects - Im either really missing something or excel has gone funny. Thanks for any comments -- LB7 ----------------------------------------------------------------------- LB79's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1215 View this thread: http://www.excelforum.com/showthread.php?threadid=49305 You aren�t giving a huge am...

Crazy but...
I just had a HUGE MSN mail headache and ended up reformatting and reinstalling all my software. This time around, for some reason, I decided to install MSN Explorer first after the Windows XP setup and, thus, got a prompt when installing Outlook to use my MSN address as my default address so, thinking it might be nice to try it that way, I said yes and then discovered that by doing it this way, I'd be prompted to have each of my pop addresses as well as my other mail delivered to my MSN inbox, making syncing all my mail to my pda a dream. The down side came when I went to make s...

Am I Crazy?
Am I missing something - or can I really not get a report that shows the Unitof Measure column in a Item Valuation report? We have just done inventory and need to go around and get costs for things that come by the case - or each - or lb - depending if they are buying the bulk. Cannot find that column anywhere. Has to be here and I am missing it. Please help. While I am asking - another OBVIOUS "missing link (or is it a Yettie?)... Why can't we walk around the shelves with a data collector i.e. Percon, scan the shelf, take the Percon to the office and import the needed item num...

Crazy Configuration
The current Exch5.5 is configured as follows: (a) 1 user has permissions to access multiple mailboxes For example: John and Jane have a mailbox of their own and they also want to have full access to each other's mailbox (and full access to some other user's mailboxes) (b) a mailbox is accessed (or shared) by multiple users for example: a mailbox to host email sent to job ads replies (jobs@ourdomain.com) is accessed by many users I'm now in the process of migrating to Exch2003. I understand about the 1-1 relationship between a user and a mailbox in Exch2003. Can the above be pres...

Sockets, Am I crazy??
Win2k SP3 Visc Studio 6.0 SP5 Snippet of MFC code, UDP Socket I create a socket / class if (!m_pSocket->Create(9600,SOCK_DGRAM)) then do the OnReceive(int nErrorCode) method to call receivefrom For some reason, this event (OnReceive) fires all the time and does not appear to be just 'bound' to the 9600 port, which of course brings my app to a crawl because I am continually trying to parse every packet hitting the card, not just ones directed on port 9600. Any ideas how to bind the socket to receive only on port 9600, I thought Create automatically bound the socket to the port...

basic...but driving me crazy!
if I double click on a cell containing a formula the formula appears...and won't go away!...the number attained from the fromula is replaced in the cell with the formula...how do I get the product of the formula back and get rid of the formula?...thank you...tino hawsoon, Sounds like you formatted your cells for Text after you initially entered the formula: editing the formula then makes Excel treat the formula as text and not a formula. Select all your cells where this is a problem, and format them for general. Then select each of the cells that are showing the formulas still, doubl...

crazy noise in Directsound
I'm using Directsound to play two wavs. Sound 1 is a looped wav and is run with the looped flag set in Play(). Sound 2 is a sound that lasts about a second and isn't looped. Sound 1 turns off asynchronously via a button control (using Stop()). The next occurrance of sound 1 after sound 2 is turned off has a loud unwanted pop that happens at the beginning of it. I've tried everything I can think of and have started shooting in the dark. Set the play position in the buffers to zero when turning sound 1 off, polling sound 1 and waiting to turn it off until it's at a pl...

Thread Craziness
I have problem with an object that doesn't terminate when the thread it creates does. This is a problem on XP release code but not debug. Hope someone can help. The class is something like this class MyClass { public: BOOL m_bOpen; BOOL m_bThreadActive; }; MyClass creates a thread, sets m_bOpen to TRUE and sends a pointer to itself to the thread. The thread DWORD MyThread( LPVOID lpdata) { MyClass * pclass = (MyClass*)lpdata; pclass->m_bThreadActive = TRUE; do { ...do some stuff, wait when nothing to do }while ( pclass->m_bOpen); pclas...

HELP!!!!! My graphics went crazy and half are missing.
All of a sudden my computer screen blinked and turned back rto windows classic style settings. I fixed the problem and got my windowsXp back and when I went online my homepage was missing graphics all over the page. No menu bar, but you can run the mouse around the screen and when it hits something that you can't see it pops-up. My e-mail page has change its text color to blue and has no dimension, and my F/B has no X's or photos until you click on the box. My windows media player is flat and black and white. All still work, but very slowly but it is annoying not to k...

This is crazy!!!
Hi, How do I make the first row the column header so when I insert a new row (just below the header) it doesn't take the format (size,color, style etc) if the first row? I don't want to keep clicking a button all the time. There must be a way to disable this. The reason for this is that I have a program that exports data form SQL server to excel and everyting it does that all the rows take the format of the first row. Any ideas? Thanks Hi Chris Click on Tools|Options, and under the Edit tab, untick "Extend list formats and formulas" option -- j.kasselman@atlanti...

Empty Subform is a crazy !!
dear all now my problem is so simple so mad also :) i have a form consist of 4 subforms each has a textbox called subtotal (=sum([totcost]) and i have a textbox in the main form which is the grand totals for the 4 subtotals now the problem if one of the subforms has no records its subtotal box be came clear without any value ( its value not null nor empty i test it by isnull & isempty) and the result that the grand total give error not even the totals of the other subtotals ??? any tips??? thanks all bye -- Message posted via AccessMonster.com http://www.accessmonster.com/U...

Going Crazy
I am having a problem with IE6 nad Outlook Express. It seems that I cannot print my e-mails in OE. I have no problem printing from Office, IE, Word, or anything else, only OE. I receive the following message: Internet Explorer Has Encountered Script Error Line:1344 Char:1 Error: Unspecified Error Code; 0 URL: res://c\windows\system32\shdoclc.dll/preview.dlg Do you want to continue running scripts on this page? Yes No I have done search after search after search to remedy this problem, but to no avail. I have called Tech Support at HP, and they were NO HELP at all. I have ins...

You're Crazy
This is a multi-part message in MIME format. ------=_NextPart_000_0034_01C6B092.D5C10B70 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable What time? --=20 ------=_NextPart_000_0034_01C6B092.D5C10B70 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dwindows-1252"> <META content=3D"MSHTML 6.00...

Hyphenation driving me crazy!
Grrrrrrrr. When I use Publisher (2000, in case it matters) I get the same message over and over and over and over and over, I mean literally every 30 seconds or so, on its own AND every single time I make any sort of change to a document even if that change wouldn't require hyphenation. That message is: "Publisher can't hyphenate this document. This feature is not currently installed. Would you like to install it now?" The answer is "No, I would not like to install it now." However, Publisher will not take no for an answer. It keeps asking me and asking me and ask...

Crazy printing ...
I'm using XP (SP2) and XP Office. This includes Publisher 2003. I'm using a Canon S200 printer. This was previously attached to another computer running Win98SE. There were no printing problems. I installed it to the XP system using the Canon CD. Now however it goes crazy when I use Publisher. I'm trying to print a booklet, two A5 pages on a single A4 sheet. Everything pans out in Print Preview. When I print however, all sorts of crazy things happen. It shrinks the text to nothing. It prints portrait instead of landscape. And more. Whatever I tell it to do, it ignores. As far a...

Label Merge, I'm going crazy!
I'm stuck and really need some help. Yesterday I spent considerable time creating the document layout for a label merge. I was using the step-by-step wizard and going back and forwards until I thought I had it "just right" and then I printed the labels and saved the document. Today I needed to make changes and opened the document again. As luck would have it, I changed the underlying spreadsheet (adding more columns), so I got an error message that the fields were not matching. I messed around and got the fields matched up, but then it seemed I had to apply the chang...

Driving Me Crazy!!
Every time I try to receive my email, it starts the download, then I get this error signature: AppName: oulook.exe, AppVer: 9.0.0.6604 ModName: rtfhtml.dll ModVer: 9.0.0.6418 Offset: 000937f Then Outlook locks up. I've tried the repair function, and no luck. I created a new .pst file, no help. I have a PIII-733mhz, 384meg ram, WindowsXP Home Edition, MS Office 2000 (which includes Outlook). I also have a PocketPC (iPAQ 2215)which I synch with MS Outlook Contacts, Calendar, Notes, and Tasks. I do not synch with the inbox, but somehow I think my troubles are with the pda. Any Help fr...

Absolutely Crazy Error
Hi, OK. This makes NO sense. I have 3 modules. One is the regular Concatenate by Duane Hookum that works in tons of my applications. (I just modified it to put in a carriage return, but that works fine in other applications.) That code is at: http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=16 The second is a module to ascertain the width of a text box by Stephen Lebans. Also, it works just fine in other applications. This can be found at: http://www.lebans.com/textwidth-height.htm I have a new application, and BOTH the above modules worked just fine and did th...

Driving me crazy
My new mail does not show up in my inbox unless I click on sent items or if I exit out of outlook. When I click on sent items it will tell me that I have new messages. This is happening in Outlook 2000 & 2002. I am running exchange 2000..Any ideas.. Thanks in advance. Jarrod ...

A crazy thought...
.... but hear me out. Most of us who use MS Money are a passionate bunch. The thought of going back to Intuit, the 800lb. gorilla, makes my stomach churn. We can count on higher costs, poor(er) service, a shoddier product. Has anyone considered approaching Microsoft about purchasing Money? I mean spinning off Money as a separate company, independent of Microsoft. The first question, of course, is who will pay for the purchase? It could be a privately held company, with venture capital money. With the economy being what it is, this may be difficult but it's worth a shot. Or how abo...

MS Money is driving me crazy!
Hi, I make more data entry mistakes because of the "default" and auto entries in MS Money', in the posting of checks and deposits, and also in budget items and reports. My entries are not identical as MONEY would believe, so the automatic repetition of the prior entry, date, amount, payee, etc causes me much distress. I'd rather hand type the entry from the start, than have to erase the auto entry and retype. .. One area where there is no auto entry and there should be, is after posting a check or a deposit, the next empty line should be ready for data. I expect it would ...

Crazy request
I don't think this is possible, but thought I'd ask to make sure. Windows 2003 SP1, Exchange 2003 SP2 We have a mail enabled public folder that people email when they need to make travel arrangements. The group responsible for checking/responding to the mail in this folder would like to forward any email that is received to the folder after hours to a Blackberry handheld. I understand that I can set up a forwarding address on the public folder, but that is an all or nothing thing (i.e. can't set it up to only forward after business hours). Are there any solutions availab...

Syncing gone Crazy with ODA and Outlook !
I recently bought a new laptop, and decided I'd also sync it to my PCD ( Ipaq 1940 ) with ActiveSync ( 3.7 )... All was going well...and I could sync my Desktop Pc to the Ipaq as usual...and then from the Ipaq to my new Laptop...and back and forth as required etc.... But tonight for some unknown reason it's all gone crazy....and every time I connect the Ipaq it makes all the other PC sync to it !...instead of updating any new data....!!! So now every time...it goes through every single files etc...and I'm getting nowhere !!! Any clues as to what has happened here ??? -...