在51aspx上下了一个网站准备研究研究,编译通过,但运行起来报错淄博某泵业网站源码 http://www.51aspx.com/CV/ZiboPump/A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)具体环境为VS2008SP1加上SQL Server 2005

解决方案 »

  1.   

    "   at _Default.Getnote() in c:\\Documents and Settings\\Xu Hong\\My Documents\\Visual Studio 2008\\WebSites\\WebSite1\\Default.aspx.cs:line 135\r\n   at _Default.Shownote() in c:\\Documents and Settings\\Xu Hong\\My Documents\\Visual Studio 2008\\WebSites\\WebSite1\\Default.aspx.cs:line 112\r\n   at _Default.Page_Load(Object sender, EventArgs e) in c:\\Documents and Settings\\Xu Hong\\My Documents\\Visual Studio 2008\\WebSites\\WebSite1\\Default.aspx.cs:line 20\r\n   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)\r\n   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)\r\n   at System.Web.UI.Control.OnLoad(EventArgs e)\r\n   at System.Web.UI.Control.LoadRecursive()\r\n   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)"
      

  2.   

    <connectionStrings>
    <add name="MYCONNECTIONSTRING" connectionString="data Source=.\XH;database=newsite;user id=sa;pwd=123456"></add>
    </connectionStrings>
    数据库连接字符串