title: To Read connection String from web.config
body: <p>WCF service on IIS.
  I have got a problem with reading connection string from web.config file.
  my connection string looks like this :</p>
  
  <pre><code>    &lt;connectionStrings&gt;
    &lt;add 
      name="ABC" 
      connectionString="DEF"
      providerName="GGG"
    /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>My code in Global.asax.cs :</p>
  
  <pre><code>protected void Application_Start(object sender, EventArgs e)
          {                    
  
             cons_Webdata =  WebConfigurationManager.ConnectionStrings["ABC"].ConnectionString;
  
          }
  </code></pre>
  
  <p>I have error message in "cons_Webdata = ......." : </p>
  
  <blockquote>
    <p>Object reference not set to an instance of an object.</p>
  </blockquote>
  
  <p>What's wrong?
  Thanks.</p>