开发者

Site isn't loading, all I'm seeing are these Sql Server errors being caught & logged

Background: we moved from Sql Server 2005 to Sql Server 2008 R2. This application is deployed to 4 web servers. Only one of them is causing trouble. Only (maybe) 1 in 10 times the page will load, otherwise nothing gets returned at all, as in a completely empty response

This is the first error caught

Error Message: 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: .Net SqlClient Data Provider

Stack Trace:    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at System.Web.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo)

this is the second one:

Error Message: 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: .Net SqlClient Data Provider

Stack Trace:    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at System.Web开发者_如何学Python.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo)
   at System.Web.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo)

I have no idea what the problem could be.


Your first error started with...

Error Message: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005

Bearing in mind you said you've upgraded to SQL Server 2008 R2, it looks like something is still referencing the old SQL Server 2005 instance? I would check your asp.net application to make sure it has the correct connection setting for your new SQL Server.

On SQL Server, you could check to make sure SQL Server allow Remote Connections.


From the call stack, it appears that perhaps one of your web.config files for the application is configured to use ASP.NET session state storage inside SQL Server. You say it is deployed to 4 servers. I would check all of the web.config files and ensure that you are not using in-proc session state on 3 for example, and then trying to use session state storage in SQL on the other.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜