public static string conStr
        
{
            
get
            
{
                                
return "server=(localhost);database=xxx;uid=xxx;pwd=xxx";
            }

        }

上面是连接串,然后通过MS的Microsoft Application Blocks for .NET读取数据,结果出错:

 

Server Error in '/' Application.

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

什么原因?