I have created a Outlook Shared Add-in.I am creating coneection to my sql database.
I am able to create connection but how to store it in a config file and access the connectionstring from there?
Currently I am trying below code but it is throwing an exception.
<add key="ConnectionString" value="Data Source=192.168.40.46;Initial Catalog=Spot;Persist Security Info=True;User ID=sa;Password=sqlad;Min Pool Size=05;Max Pool Size=160;Connection Timeout = 250" />
string connectionstr = ConfigurationManager.ConnectionStrings["ConnectionString1"].ConnectionString;
SqlConnection PacktSQLConnection = new SqlConnection(connectionstr);