Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. WebConfig file

WebConfig file

Scheduled Pinned Locked Moved C#
csharpannouncementworkspace
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    C Coudou
    wrote on last edited by
    #1

    I want to update webconfig file in a system or in winform using c#. I have a web application and system application but i want the system application updates the databasename, username and password. I tried this one: Configuration config = WebConfigurationManager.OpenWebConfiguration("~\\DataMaintenance\\Web.Config"); but its not work :(

    ****************************** I just want to know everything

    S 1 Reply Last reply
    0
    • C C Coudou

      I want to update webconfig file in a system or in winform using c#. I have a web application and system application but i want the system application updates the databasename, username and password. I tried this one: Configuration config = WebConfigurationManager.OpenWebConfiguration("~\\DataMaintenance\\Web.Config"); but its not work :(

      ****************************** I just want to know everything

      S Offline
      S Offline
      sam
      wrote on last edited by
      #2

      In windows application config file named as App.Config. You can try following procedure to update data in App.config. Create a Place Holder for your DataBaseName. read App.config from Application.StartupPath as a text File Replace the Place Holder and save the file

      C 1 Reply Last reply
      0
      • S sam

        In windows application config file named as App.Config. You can try following procedure to update data in App.config. Create a Place Holder for your DataBaseName. read App.config from Application.StartupPath as a text File Replace the Place Holder and save the file

        C Offline
        C Offline
        C Coudou
        wrote on last edited by
        #3

        no. no. no. what i mean is is it possible to write web.config from a windows form.

        ****************************** I just want to know everything

        S 1 Reply Last reply
        0
        • C C Coudou

          no. no. no. what i mean is is it possible to write web.config from a windows form.

          ****************************** I just want to know everything

          S Offline
          S Offline
          sam
          wrote on last edited by
          #4

          again i am confused. I got two impression from your statements 1.You want to make an application which produces WebConfig Files 2.You Want to Update an webConfig from a windows Application Ans: 1. Yes you can. Just follow the formatting and tags given in webconfig file and write is as normal text File and save it as desired name. 2. Yes you can. Create a web service that does the desired changes i.e. upadting your webconfig and call it from your windows application

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups