By thopcroft - Mon 21 May 2012
|
I have setup a new clean website but when I try to run the site for the first I get the following error message:-
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.
Stack Trace:
[SqlException (0x80131904): 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)] System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1316 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126 System.Data.SqlClient.SqlConnection.Open() +125 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +123 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +166 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +115 Kartris.kartrisConfigDataTableAdapters.ConfigCacheTblAdptr._GetConfigCacheData() +82 Kartris.KartSettingsManager.RefreshCache() +173 Kartris.KartSettingsManager.GetKartConfig(String Config_Name, Boolean RefreshCache) +74 Kartris.CkartrisFormatErrors.ReportUnHandledError() +51
|
By Mart - Thu 24 May 2012
|
"A network-related or instance-specific error occurred while establishing a connection to SQL Server"
This normally means that the database connection string is wrong (that it can't even find the database). If its just permissions/incorrect credentials then you normally get a message to that effect. Have you checked the connection string in the web.config?
How did you setup the site? Did it go through the setup wizard within Kartris?
|
By Paul - Thu 24 May 2012
|
Figured out the problem - an old license.config file was in there. We've redone the zip with a new one. We've also made a minor change to the SQL setup script. I've tested this couple of times now and went through fine for me without any errors now.
|
|