Professional Web Applications Themes

Creating and Consuming XML configuration - ASP.NET General

Is there an example anywhere of how to create and consume XML configuration information via code? I've got a site for which I want to present the user with a web form for configuration information and allow them to fill in the form and persist it to an XML file on the web server. This XML file can then be read at run-time for another page to use in constructing itself. The form code and customization code I have done - but I'm wondering if there's a "best practices" example on how to create and consume and XML config file. ...

  1. #1

    Default Creating and Consuming XML configuration

    Is there an example anywhere of how to create and consume XML configuration
    information via code?

    I've got a site for which I want to present the user with a web form for
    configuration information and allow them to fill in the form and persist it
    to an XML file on the web server. This XML file can then be read at run-time
    for another page to use in constructing itself. The form code and
    customization code I have done - but I'm wondering if there's a "best
    practices" example on how to create and consume and XML config file.

    I've come to the conclusion that using the DOM to write to the web.config is
    a bad idea, since, as has been pointed out to me, it will cause a re-start
    every time it's written.

    Thanks in advance!

    Christopher


    Christopher Guest

  2. #2

    Default Re: Creating and Consuming XML configuration

    If you didn't need to write the data back out, this is how you use the
    web.config file to store crap:

    http://www.c-sharpcorner.com/Code/2002/June/ConfigApp.asp

    I'm a big fan of keeping things like you describe in a database. In today's
    day and age, with fast networks, fast processors - a local database (SQL2K,
    NOT Access) can really be considered part of the immediate app.. because
    access time is so negligible...


    "Christopher Ambler" <net> wrote in message
    news:eCX9uy$phx.gbl... 
    configuration 
    it 
    run-time 
    is 


    Frank Guest

  3. #3

    Default Re: Creating and Consuming XML configuration

    Thanks for replying, but let me state it again.

    I do want to write it back out, as I said below:
     

    And while I realize that a database is always a good option, I not only
    don't have rights to install one on this server, but don't have the spare
    cash to purchase SQL server for such a small site.

    I'm looking for an example of what I *want* to do, not what I *should* be
    doing :-)

    Christopher

    "Frank Drebin" <com> wrote in message
    news:g5V2b.34243$news.prodigy.com... 
    today's 
    (SQL2K, 
    > configuration 
    > it 
    > run-time [/ref]
    web.config [/ref]
    re-start 
    >
    >[/ref]


    Christopher Guest

Similar Threads

  1. Jrun.exe consuming up 1GB of RAM
    By tech_guy12 in forum Coldfusion Server Administration
    Replies: 4
    Last Post: June 5th, 04:33 AM
  2. Consuming a web service from VB 6
    By Samantha Dixon in forum ASP.NET Web Services
    Replies: 4
    Last Post: January 15th, 03:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139