Help Help And More Help
-
is there any method to edit the configuration file from my SettingPage.aspx? all i want to change my database password-Connection Sting- from this page.... so plz i need to know what is the best techniques of the case.
-
is there any method to edit the configuration file from my SettingPage.aspx? all i want to change my database password-Connection Sting- from this page.... so plz i need to know what is the best techniques of the case.
Your config file can read an external XML file, and I believe if you do that, you can edit the external file from code.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
is there any method to edit the configuration file from my SettingPage.aspx? all i want to change my database password-Connection Sting- from this page.... so plz i need to know what is the best techniques of the case.
Ahmad Adnan wrote:
all i want to change my database password-Connection Sting- from this page....
Editing config files on runtime is not a good idea. It reloads the entire application domain. So you may loose session and other values. You can keep an external XML file for storing configuration instead of using Web.config. Then update this file using XML manipulation classes provided.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions