在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接) 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.SqlClient.SqlException: 在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接)源错误: 
行 71:                 break;
行 72:             case 6:
行 73:                 post.BindPostListNew(gvPostList);
行 74:                 break;
行 75:         }
 源文件: c:\Web Developing\Forum Samples\60903073534\WeYyzyq\Web\Controls\PostListControl.ascx.cs    行: 73 堆栈跟踪: 
[SqlException (0x80131904): 在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接)]
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +452
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +89
   System.Data.SqlClient.SqlConnection.Open() +160
   WeYyzyq.DBUtility.SqlDataBase.Open() in E:\ASPNET\Vs2005Projects\WeYyzyq\DBUtility\SqlDataBase.cs:34
   WeYyzyq.DBUtility.SqlDataBase.GetDataReader(String strSql) in E:\ASPNET\Vs2005Projects\WeYyzyq\DBUtility\SqlDataBase.cs:121
   WeYyzyq.SQLDAL.Bbs_Post.GetPostListNew() in C:\Web Developing\60903073534\WeYyzyq\SQLDAL\Bbs_Post.cs:314
   WeYyzyq.Logic.Bbs_Post.BindPostListNew(GridView gvPostList) in C:\Web Developing\60903073534\WeYyzyq\Logic\Bbs_Post.cs:173
   Controls_PostListControl.BindPostList() in c:\Web Developing\Forum Samples\60903073534\WeYyzyq\Web\Controls\PostListControl.ascx.cs:73
   Controls_PostListControl.Page_Load(Object sender, EventArgs e) in c:\Web Developing\Forum Samples\60903073534\WeYyzyq\Web\Controls\PostListControl.ascx.cs:29
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +13
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +45
   System.Web.UI.Control.OnLoad(EventArgs e) +80
   System.Web.UI.Control.LoadRecursive() +49
   System.Web.UI.Control.LoadRecursive() +132
   System.Web.UI.Control.LoadRecursive() +132
   System.Web.UI.Control.LoadRecursive() +132
   System.Web.UI.Control.LoadRecursive() +132
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3750 
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.42; ASP.NET 版本:2.0.50727.210