Use the appSettings part of the Web.Config to store connection strings. This xml can then be modified anytime later and the next time a user browses to the site it will pick this new setting up.
One connection string is to Oracle and the Other is to SQL server
Code:
<appSettings>
<add key="ORACLEConnectionString" value="Provider=OraOLEDB.Oracle.1;
Persist Security Info=False;Password=blah;User ID=greg;Data Source=sph;" />
<add key="SQLConnectionString" value="data source=SQL1;initial catalog=ID_V;
integrated security=SSPI;persist security info=False;workstation id=TH03D374;
packet size=4096"/>
<appSettings>
To get the values of the connections strings you would use
Code:
string conn = ConfigurationSettings.AppSettings["ORACLEConnectionString"];
OleDbConnection myConnection = new OleDbConnection(conn);
When the site goes live change the debug setting to false which will make the site have a little better performance.
Code:
<compilation defaultLanguage="C#" debug="true" />
Customer errors can be handled be turned off but I prefer them to be turned on as below.
Code:
<customErrors mode="Off" />
Bookmarks