DNN 6.01.02(98) On Windows Server 2008 R2 Standard, SP1
.NET 4.0
SQL Server 2005 Standard on Windows 2003 R2 Standard, SP2
I'm trying to load a custom module written by one of our developers to run in our production environment. The module loads fine without any errors. When I add the module to a page, the module fails indicating there is a problem connecting with the SQL Server.
I loaded a fresh version of DNN on ServerA pointing to the DNN database on ServerB. Everything works fine. On ServerB is another database which the custom module accesses. I get an error (listed below). It seems to be a SQL Connection error. I have double/triple/quadruple checked the connection string in the Web.config file, and all seems to be in order. I can successfully create an ODBC connection from ServerA using the exact same connection string parameters if I have the client configured for TCP/IP.
I noticed that the error below referenced Named Pipes. If the ODBC client is configured for Named Pipes, it fails. The SQL Server is listening on both TCP/IP and Named Pipes. Is there something within the CS code that should be using TCP/IP instead of Named Pipes?
BTW, this is a second attempt using a fresh DNN installation. I had the same issue on another DNN instance on the same web server. On that instance we have an unrelated SGSV module that makes a connection to a third database on ServerB with no problems. Every database connection uses the "System.Data.SqlClient" provider. Only the custom module isn't connecting. I'm pulling my hair out.
Error: Property Activity is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: 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.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) at System.Data.SqlClient.SqlInternalConnection. (SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) 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.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user) at System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe() at System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode() at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) at org.santaana.dnn.PropertyActivity.LinqPropertyActivityDataContext.cpS_get_parcel_info(Nullable`1 property_id) at org.santaana.dnn.PropertyActivity.View.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---