How to change the tag add value in app.config using c#

Hi all

Please help me to change the value of a value by using c# code.

I tried to google.

App.config code:

----------------------------

<>

XML version = "1.0" encoding = "utf-8"? >

Configuration >

appSettings >

Add key = "Lastmodifiedtimeforfile" value = "16/05/12 13:57:12" / > "

-----------------

c# code

----------------

System.Configuration.

Configuration config = ConfigurationManager.OpenExeConfiguration (ConfigurationUserLevel.None);

config. [AppSettings.Settings

"Lastmodifiedtimeforfile"]. Value = "16/05/12 16:15:42;

config. Save)

ConfigurationSaveMode.Modified); ConfigurationManager.RefreshSection ("appSettings");

But when I pass my code and the execute method, I do not see the change of all configuration files (App.config,. exe.config, or. vshost.exe.config).

Even I tried the following code:

XmlDocument xmlDoc = new XmlDocument();

xmlDoc.Load (AppDomain.CurrentDomain.SetupInformation.ConfigurationFile);

foreach (XmlElement element xmlDoc.DocumentElement)
{
If (element. Name.Equals ("appSettings"))
{
foreach (XmlNode node in the element. ChildNodes)
{
If (node. Attributes [0]. Value.Equals ("Lastmodifiedtimeforfile"))
{
node. Attributes [1]. Value = DateTime.Now.ToString;
}}}}

xmlDoc.Save (AppDomain.CurrentDomain.SetupInformation.ConfigurationFile);

But it does not work. Please help me its urgent.

Kind regards

Selva.C

Hi Selva,

Thanks for posting your question in the Microsoft answers Forum.  I would suggest to repost your question in our MSDN forums:

http://social.msdn.Microsoft.com/forums/en-us/categories

Tags: Windows

Similar Questions

  • How to change the number of values in the hour that are restricted.

    Hello

    May I know how to change the number of values in the hour that are restricted.

    In fact, we have improved of obiee in obiee 11g 10g. Data base is the same for Both.In 10 g the prompt value is limited to show only 35 records per page. As we passed it shows only 35 Records in 11g also. How can I change this limit to 11g.

    Please suggest me! Its urgent!

    Thanks and greetings

    Navnitha

    Hello

    In the advance tab we have the XML of the upgraded report, copy it into a Notepad and try to find the line beginning as below

    In 10g, we have something like below, simply remove the choicesPerPage = '35' from 11 g OBIEE XML report

    Thank you

    RAM

  • How to change the tag page layouts

    I'm trying to change my great model produced.  When adding the tag related products he puts them with horrible HTML full of Tables etc.  I can't seam to figure out how to change the layout for the tags.  What Miss me?

    {tag_name}

    {tag_poplets}
    • Price:

      {tag_saleprice}

    • {tag_attributes}
    • {tag_grouping}
    • Quantity: {tag_addtocartinputfield}
    • {tag_buynow}

    Description

    {tag_description}

    Related products

    {tag_relatedproducts}
    {module_facebookcomments, url ="http://www.impactnations.org/{tag_itemurl_nolink}", moduleTemplateGroup = "Default", local = 'en_US', message = '2', width is '500', olorScheme = 'light' c}

    You have a few options with the configuration of the tag:

    The developer reference

    But what makes a tag on is what you have to work with.

  • How to change the default unit value

    How can I change the default value of inches in the new document to mm

    Edit > Preferdences > General > units.  You may need to restart Acrobat.

  • How to change the settings of computer Image virtual using VI SDK 4

    Hello

    All the

    I just wanted to know how to change the setting of Image of computer virtual using VI SDK 4

    Setting virtual machine Image could be (memory setting etc.)

    (1) Yes (If yes or no do you while the virtual machine is online is totally based on the question of whether the operating system supports or not)

    (2) I don't know what ' TTL you are referring?

    I would say take a look at the previous documents, I've linked to familiarize yourself with what you can do and another great reference point is the vSphere API itself doc: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/index.html and make use of Research to see what properties/attributes are available on the entities/objects.

    =========================================================================

    William Lam

    VMware vExpert 2009

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    repository scripts vGhetto

    VMware Code Central - Scripts/code samples for developers and administrators

    150 VMware developer

    Twitter: @lamw

    If you find this information useful, please give points to "correct" or "useful".

  • How to change the default value of MS Paint record - an output to jpg for shortcuts KEYBOARD: Alt-F-A (or S)?

    I've seen a lot of posts on this subject here, but they are all on the use of the mouse and I did not yet find one with an answer to MY specific dilemma.

    I take screenshots and edit photos (Nothing fancy) almost every day. Given that my physical disability in my arms causing me pain and discomfort when I use the mouse, I need to use several shortcuts as humanly possible help reduce the constant pain, I'm still in my right arm using the mouse.

    I *need* to know how to change the default hotkey Alt-F-A (or S) to save it as a JPG file relative to the current default value PNG which I use never, never. If it requires editing the registry, no problem, just point me in the right direction and guide me on how to do it.

    Thank you

    Lee

    LAST UPDATE 09/30/15 @ 16:54:

    The solution to my dilemma can be seen in my other thread (analogue/reprise). It is in case anyone in the future stumbles across this thread with the same problem and needs the answer.

    Since this thread will not be deleted, I would would add the link to the solution in case anyone stumbles across this in the future.

    See my other thread at: [Solution here]

  • How can I change the tags on my post on the support forum?

    My recent post ('start failure after firefox 12.0...') has been marked as a post on Firefox 3.6, but it was a post about a problem with Firefox 12.0. My problem is that Firefox 12.0 would not start once it has been installed. I had to re - install Firefox 3.6 to write the post. Now, the message is marked as a pole of Firefox 3.6. The same problem occurred last month when updating Firefox 11. I would like to remove the current tags and replace them with Firefox 12.0.

    How can I change the tags on my post?

    Added: this post has the same problem.

    I removed the tags in Firefox 3.6 and added the tag Firefox 12.0 to that thread instead.

  • Web site created by Muse. The greats until tweek of today. Web site insists now for open index.html in the tablet. Don't know how product, nor how to change the default value for pc of office/index.html. Would advise. Bob

    Web site created by Muse. The greats until tweek of today. Web site insists now for open index.html in the tablet. Don't know how product, nor how to change the default value for pc of office/index.html. Would advise. Bob

    Hi Bob

    I think that you have found the solution but if still you are facing the question, please give me the url of the site that opens another provision in the tablet.

    Please make sure desktop redirection is checked in the site properties page layout.

    Thank you

    Sanjit

  • How to change the values of business rule at run time?

    Hello

    I'm using Oracle 11g SOA. I did a BPEL process that uses Business Rule. Now the BPEL process is deployed with business rules so how to change the value of the business @runtime rule. I don't want to change the value @design time and deploy the code again.

    Is there a console or the portal? as Oracle BAM has own url? What is the url of Business Rule Manager?


    Thank you

    Can you check is the deployment of "composer" is in Active state.

    In the weblogic administration console, navigate to Environment--> Servers--> SOA_SERVER1--> Deployments (tab) on the left side of the menu.

    Thank you
    Vijay

  • How to change the colors of the ADF calendar from different suppliers?

    Hello again once I use JDeveloper, 11.1.2.3.0,

    This might be the third question I ask here on this subject, and until now, I didn't get any answer.

    CAN SOMEONE PLEASE PROVIDE AN EXAMPLE OR A TUTORIAL ON HOW TO CHANGE THE COLORS OF THE ADF CALENDAR ITEM?

    Sorry for asking again, but I find it very cool that nobody answers to these questions. Y at - it a bug or nobody knows really how to customize the calendar component?

    Hi user,

    Here a few steps:

    (1) create a bean

    (2) create a variable with the hash table data type, for example:

    private HashMap activityStyles = new HashMap<>, InstanceStyles > ();

    (3) create a method where you load the desired styles, for example:

    public void loadactivityStyles() {}

    try {}

    HashSet setconf = new HashSet();

    HashSet setnoconf = new HashSet();

    HashSet setadm = new HashSet();

    setconf. Add ("STATUS 1");

    setnoconf. Add ("SITUATION 2");

    setadm. Add ("STATUS 3");

    activityStyles.put (setconf, CalendarActivityRamp.getActivityRamp (CalendarActivityRamp.RampKey.GREEN));

    activityStyles.put (setnoconf, CalendarActivityRamp.getActivityRamp (CalendarActivityRamp.RampKey.ORANGE));

    activityStyles.put (setadm, CalendarActivityRamp.getActivityRamp (CalendarActivityRamp.RampKey.BLUE));

    }

    {(4) set the activityStyles variable in the calendar component property "activityStyles = #{myBean.activityStyles"}

    (5) set your field of Tag calendar (located in the Wizard) the field of the VO that contain the values configured in the method (1 STATE, STATE 2, STATE 3, etc.). It allows to to correspond with the activityStyles variable when running.

    (6) run and see the colors.

    Good luck.

    Jhon Carrillo

  • How to change the default (Windows 7) painting 'Save as type' JPG (from PNG) format when recording using the * only * the keyboard?

    This is the 2nd time this same question, the 1st time that I was given an irrelevant answer which was not helpful at all. Please take the time to read and understand what I need to before you answer.

    I just need to learn how to change the default PNG to JPG, so every time I save a screenshot using (only) the keyboard, it will already be showing JPG as the "Save as type". I am sure that it requires an edit registry so just point me in the right direction and guide me on how to do it, that's all I need.

    To help you understand my dilemma, I take a lot of screenshots and Ctrl + V paste in Paint almost daily. Since my physical disability in my arms causing me pain and discomfort when I use the mouse, I avoid using the mouse I use the shortcuts as much as possible to help reduce the constant pain, I'm still in my right arm when using the mouse. I hope I have explained well enough details.

    If it's in the wrong place, please move to a better place.

    Thank you

    Lee

    I don't know of any registry value, but you can use the key sequence to "Save as jpg.

    ALT

    F

    V

    J

    The F key may be pressed simultaneously with the ALT key or after him.

    You can reduce the number of keys to just ALT plus a digital key by using the following, adapted from one method described HERE.   Setup is much easier with a mouse, but can be done using the keyboard only.  I showed you the controls and mouse shortcuts keyboard to add an icon "" Save as JPG"to the Quick Access toolbar.

    Open Paint

    Mouse Keyboard equivalent
    Click on the file Menu (upper-left) Press ALT + F to open the file Menu
    Hover mouse on ' Save as ' to open the list of file types Press V to view the list of file types
    Right click on JPG to open the context menu Use the TAB or down arrow key to select JPG and then press SHIFT + F10 to open the context menu
    Click "add to quick access toolbar. Press A to "add to the Quick Access toolbar.

    At this point, your installation is complete.

    With open Paint, press the ALT key .  This will display the keys associated with various actions.  In my case, "" Save as JPG"icon that has been added to the Quick Access toolbar was the fifth icon (after save, undo, redo and print).  So, to "Save as JPG," I would press ALT+5 (even once, you can press 5 either with or after you press the ALT key).

  • How to change the configuration of keyboard U.S. / UK?

    Hello

    I just bought a Lenovo G550 and very nice it is too.  It is of course set up with a US keyboard and I'm in the United Kingdom.  This means that on the keys of my @ is a "and the sign of my Sterling is a #."  Yes I know that I can use the "make a @"

    and I can't 0163 alt to create a symbol of the book, although it doesn't let me do in this post?  Is there a way I can change the settings of the keyboard in the UK please.

    When I type the cursor often also begins in another part of my document which means what I'm typing needs a constant correction.  I thought at first it was just in the open office b

    UT it does on th

    is the forum see!  It also does in my emails which is hotmail.  Can someone help me please?

    Moderator edit: matched subject to question.

    I do not know if I understand, but you are looking for how to change the keyboard from US to UK in Windows? If this is the case, go into the control panel and the locale. There, you should be able to add any other keyboard layouts or remove them as well as set a default value. Under regional settings, there are other parameters that you can change if you are in the United Kingdom.

    -gan

  • How to change the name of provisioned resource account

    Hello

    In the custom connector that we have currently in place when an account is put in service the name of the account appears as a random value.

    How do change the name of the account funded from this random number to some loginid to say name invalid.

    Thanks in advance.

    Try the following steps:

    To change the name of the account to the account user id, you can follow the instructions below:

    1. open the form of the process of the resource that you want to display the user id as the name of account, instead of this strange number for example. UD_IPNT_USR

    2. create a new version of the form.

    3. go in the Properties tab.

    4. Select the user ID property and click on add property button.

    5. Select the account name and the value is false.

    6. save the form and make the version active.

    7 connect to IOM self-service console, select a user with iplanet account for her. You can see the user id of the account in the account instead of the strange number name,

  • How to change the color of the navigation bar based on other

    I need to change the color of my navigation bar, on my page. I already did on my other three pages. With the help of http://work.smarchal.com/twbscolor/scss/9b59b68e44adecf0f1ecdbff0 , but now I have made a new page I don't know how to change the color of the navigation bar to match exactly the three other pages. Please help.

    Bootstrap CSS is read-only and should never be changed.

    Creating CSS code on each web page is redundant & can cause inconsistent styles.  Use rather a stylesheet external called custom.css including all your HTML files are linked. In this way, when you make changes to your custom.css file, these styles will automatically apply to all pages of the site.

    Both inside theTag under the Bootstrap CSS code, add a link to your custom.css file.

    Nancy O.

  • How to change the size of font IR (only) dynamically

    Hello

    On the http://www.danielmcghan.us/2009/01/that-font-is-too-small.html blog, there was a great example of how to change the size of font IR on the fly.
    Some how seems that it does not have new reagent 25 theme, which is not having "td." If someone could help me.

    I would like to add a few record capacity in other tables (table user preferences)... Penny Please extend this example if possible.

    For this I did on the cloud Apex demo: FONT_SIZE_ADJ_APP

    http://Apex.Oracle.com/pls/Apex/f?p=2354

    Data connection:
    United Nations: guest_admin
    PWD: Qwertz123!

    THX in advance for your help.

    BRG,
    Damir

    The actual code Th example of work seems different from the blogpost

    Might want to try this code (in your page template)

    (-) Save / Reset (+)
    

    To save this in a table of custom user preferences:
    -You can change the application RETURN_NOTHING to insert/update process using the FONT_SIZE_ADJ element

    And add the calculation to set the value in FONT_SIZE_ADJ of the table for the first time user preferences when users login

Maybe you are looking for

  • Satellite P20-801: problems in Microsoft Windows movie maker

    When I try to write a film's Director on a CD I get the message "a CD burner was not detected.I have the Satellite P20 801.

  • Suspicious mail

    I never know if this type of mail is to Windows, Microsoft or just a scam find the task. Please inform me if this was sent by one of your teams. I will in the future, create a folder in the mail so I can think, but what I'll do is move all the inform

  • LV2013 not recognize the Windows CE device

    An interesting problem, this morning after that works correctly throughout the day yesterday, my 2013 LV on XP suddenly decided that it did not recognize the Touch Panel Windows CE 5.0 Device as a device supported. He worked very well all the rest of

  • RV82 Dual WAN and online banking. Packages of two IP addresses

    Hi all I have a set RV082 in place with two different ISPS (load balancing). Some time ago, users began to experience problems with online banking. It seems that the banking system set up more than a 'channel' to/from the end user and that bank syste

  • Images of text may not of blackBerry Smartphones

    This new 9350 curve of love. Coming from a droid to Samsung Galaxy S, it's such an improvement. The curve is fine except that I can't send a picture in a text. I can email them, send to Twitter and Facebook but no texting. All text without images wor