1

I am new to .net and C# and facing difficulty in modifying app.config.

In my app.config file, I have:

<UserInfo Domain = "domain" UserName = "Name" Password = "password">

Normally this information is given manually, when asked for, in the application. Is there anyway to modify the C# code such that this information is directly taken from an excel file with the required details. The application right now does not use or work with MS-excel.

Matt
  • 14,906
  • 27
  • 99
  • 149
  • "from excel" - from excel file? Some row in excel file with userInfo data or you mean creator of excel file? Your application work with MS Excel. Please more details. And of course program can do everything – Ivan Feb 15 '16 at 09:43

1 Answers1

0

If you wish to use excel file, then you have to parse the excel file using third party libraries. If that seems complex to you, use CSV file instead.

or Create a separate page for administering this username and password in your app. In that page save new username/password in web.config programmatically. To know more see this question Change a web.config programmatically with C# (.NET)

Community
  • 1
  • 1