Friday, February 24, 2012

Help

I've just learned an asp.net 2.0 web app with vs 2005 and am using a SQL Server 2005. But after running programme the error occur.

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)

please help me! Fix it

Enable remote connections at the SQL Server. http://www.sqlserver2005.de/SharedFiles/remoteconnection.jpg

HTH, jens Suessmeyer.

http://www.sqlserver2005.de

|||

I have finished the remote connection but my program not running. it still inform error:

Server Error in '/TipcGiaLai' 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)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 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)

Source Error:

Line 11: conPubs = New SqlConnection( "Server=localhost;UID=;PWD=;Database=Pubs" )

Line 12: cmdSelect = New SqlCommand( "Select * From Authors", conPubs )

Line 13: conPubs.Open()

Line 14: dtrAuthors = cmdSelect.ExecuteReader()

Line 15:

please help me ! Thanks

No comments:

Post a Comment