how to save connection string in web.config programmatically
-
i m accepting users remote server ip, id, pwd, now i have to make a connection string and save it in web.config. how to save connection string in web.config programmatically? Thanks in advance.
-
i m accepting users remote server ip, id, pwd, now i have to make a connection string and save it in web.config. how to save connection string in web.config programmatically? Thanks in advance.
Go through this site. You can add and encrypt the connection strings: Encrypting Connection Strings
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
-
i m accepting users remote server ip, id, pwd, now i have to make a connection string and save it in web.config. how to save connection string in web.config programmatically? Thanks in advance.
The ConfigurationManager class has functionality that would allow you to load the configuration file, target the section that has the connection string (typically, ConnectionStrings or AppSettings), modify the connectionstring and then save back. You will need to import System.Configuration namespace.
-
Go through this site. You can add and encrypt the connection strings: Encrypting Connection Strings
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
Thanks for the solution it worked fi9