A month or so ago I took down our company website (built on DotNetNuke 4.0.5). I did so by simply moving the files to a separate section of the hard drive so IIS wasn't pointing at them, then later I put the files back. It's something I've done half a dozen times with not issue, but this time I've been getting the following error when I try to load the website:
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)
And here is the following stack I get:
-------------------------------------------------------------------------------------
[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) +428
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, Object[] parameterValues) +233
Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) +343
Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) +175
Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName) +45
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) +207
DotNetNuke.Services.Log.EventLog.DBLoggingProvider.Data.SqlDataProvider.GetLogTypeConfigInfo() +71
DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.GetLogTypeConfigInfo() +101
DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.GetLogTypeConfigInfoByKey(String LogTypeKey, String LogTypePortalID) +65
DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.AddLog(LogInfo objLogInfo) +75
DotNetNuke.Services.Log.EventLog.LogController.AddLog(LogInfo objLogInfo) +175
-------------------------------------------------------------------------------------
Nothing has changed with our setup since then, so I'm clueless as to why I'm getting this error now. Our current setup is our IIS server is on one machine, and the SQL server in question is set up on another. Named Pipes and TC/IP is enabled (with what looks like default properties) on the SQL server, and as far as I can tell there's no interference.
So any advice? I'm not very familiar with ASP.net, much less DNN, so I'm having a hard time troubleshooting anything. I check the web.config file and everything looks good. There is a SQL instance running on the IIS server, but the problem persists regardless of whether it's running or not.