Q:

Asp.net Unable to Connect to MSSQL

When I try to launch the web project in asp.net with MSSQL, it seems like I cannot connect to my database. The error message is: 
A network related or instance specific error occurred while establishing a connection to SQL server...

But when I try to run my previous projects, it works. However, when I select All Program -> Microsoft SQL Server 2008 -> Configuration Tools -> SQL Server Configuration Manager -> SQL Server Services. Instead of listing all the services, it shows me an error which is The remote procedure call failed.
I wonder how to fix this as it only happens for one of my project. Thanks in advance.

My web.config codes:
EDIT:
    <?xml version="1.0" encoding="UTF-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <configSections>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="GeospatialChallenge2014.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <system.web>
    <webServices>
      <protocols>
        <add name="HttpSoap" />
        <add name="HttpGet" />
        <add name="HttpPost" />
      </protocols>
    </webServices>
    <compilation debug="true" targetFramework="4.0">
    </compilation>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
  </system.web>

  <connectionStrings>
    <add name="GeospatialChallengeConnectionString" connectionString="Data Source=(local);Initial Catalog=SAFETY_AT_SG_DATABASE.mdf;"
    providerName="System.Data.SqlClient" />
  </connectionStrings>

  <applicationSettings>
    <GeospatialChallenge2014.Properties.Settings>
      <setting name="GeospatialChallenge2014"
        serializeAs="String">
        <value>http://localhost/SgDataService.asmx</value>
      </setting>
    </GeospatialChallenge2014.Properties.Settings>
  </applicationSettings>
  <system.webServer>
    <directoryBrowse enabled="true" />
  </system.webServer>
</configuration>

And my connection string:
 using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Web;
using System.Web.Services;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

using System.Xml;

namespace Geospatial_Challenge_2014
{
    /// <summary>
    /// Summary description for SgDataService
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class SgDataService : System.Web.Services.WebService
    {

        [WebMethod]
        public DataSet GetTrafficByDateTime(string StartDateTime, string EndDateTime)
        {
            //System.Data.SqlClient.SqlConnection myConn = new System.Data.SqlClient.SqlConnection();
            //myConn.ConnectionString = @"Data Source=(local);Initial Catalog=SAFETY_AT_SG_DATABASE.MDF;Integrated Security=True";
            SqlConnection myConn = new SqlConnection(ConfigurationManager.ConnectionStrings["GeospatialChallengeConnectionString"].ConnectionString);
            SqlDataAdapter myAdapter = new SqlDataAdapter("Select * from dbo.Traffic where Convert(DateTime,([date]+' '+[time])) >= @StartDateTime AND Convert(DateTime,([date]+' '+[time])) <= @EndDateTime;", myConn);
            myAdapter.SelectCommand.Parameters.AddWithValue("@StartDateTime", StartDateTime);
            myAdapter.SelectCommand.Parameters.AddWithValue("@EndDateTime", EndDateTime);
            DataSet ds = new DataSet();
            myConn.Open();
            myAdapter.Fill(ds, "Traffic");
            myConn.Close();
            return ds;
        }
    }
}

A:

Dude define the connection string inside your web.config itself and try.Like,    
<connectionStrings>
<add name="DBConnection" connectionString="Data Source=yourservername;Initial    
Catalog=DBname;User ID=sa;Password=yourpassword" 
providerName="System.Data.SqlClient" />
</connectionStrings>

and inside your method call the connection string as 
SqlConnection objConnection = new SqlConnection();//sql connection object
objConnection.ConnectionString = ConfigurationManager.ConnectionStrings
["DBConnection"].ConnectionString; //conn string name as in config file
SqlCommand cmd = new SqlCommand("YourStoredprocedure", objConnection);

