12 Mart 2012 Pazartesi

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: 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: 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Yukarıdaki gibi bir hatayla karşılaşmışsanız eğer sorun veritabanı bağlantısından kaynaklanıyordur muhtemelen. Microsoft SQL Server Management Studio programıyla bağlantı kurmayı denediğinizde de muhtemelen hata alacaksınız. Sorunun neden kaynaklandığını bilmiyorum ama bir çözüm yolu önereceğim :

SQL Server Configuration Manager - SQL Server Services - SQL Server (MSSQLSERVER) sağ tıklayıp start derseniz sorununuz çözülebilir.