 <p>Put this in your app.config:</p> <pre><code>&lt;configuration&gt; &lt;appSettings&gt; &lt;add key="server" value="HASIBPC\SQLEXPRESS" /&gt; &lt;appSettings&gt; &lt;/configuration&gt; </code></pre> <p>And then in your code, access it using:</p> <pre><code>return ConfigurationSettings.AppSettings["server"].ToString(); </code></pre>