.NET 2.0 Upgrade Connection Problem



Hi,

I have a windows 2000 box running a .NET 1.1 command line app as a scheduled
task that queries a sql 2000 cluster instance via tcp. This works fine.
However, if I recompile the app in .NET 2.0, the app returns a connection
timeout error whether I specify the virtual IP of the cluster in the
connection string or the DNS name. The .NET 1.1 version continues to run
fine. Both named pipes and tcp error messages are pasted below.

I've 'upgraded' command line apps to .NET 2.0 using the same database
cluster on other boxes with no problems and the only difference I can
discern is that this box is running Windows 2000 and they ran WinXP. Does
win2k switch off the named pipe and tcp sql clients by default perhaps? If
so, how do I switch them on without installing sql client tools.

Your advice much appreciated in advance,

Dan

-----

Named pipes error message

System.Data.SqlClient.SqlException: 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)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner,
Boolean& failoverDemandDone, String host, String failoverPartner, String
protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean
encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection
owningObject, Boolean aliasLookup)
at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, 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.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

-----

TCP error message

System.Data.SqlClient.SqlException: Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj)
at
System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject
stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult
asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32
bytesExpected)
at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean
encrypt, Boolean trustServerCert, Boolean& marsCapable)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner,
Boolean& failoverDemandDone, String host, String failoverPartner, String
protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean
encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection
owningObject, Boolean aliasLookup)
at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, 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.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)


.



Relevant Pages

  • Re: Unable to Locate Server
    ... >> Boolean& failoverDemandDone, String host, String failoverPartner, String ... >> owningObject, SqlConnectionString connectionOptions, String newPassword, ... >>> trying to make a remote database connection while you think your ...
    (microsoft.public.sqlserver.setup)
  • asp.net sqlmembershipprovider integrated security
    ... serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 ... host, String newPassword, Boolean redirectedUserInstance, SqlConnection ... owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +349 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: asp.net sqlmembershipprovider integrated security
    ... serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 ... host, String newPassword, Boolean redirectedUserInstance, SqlConnection ... owningObject, SqlConnectionString connectionOptions, Int64 timerStart) ... owningObject, SqlConnectionString connectionOptions, String newPassword, ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Cant access Sql Server Express 2005
    ... open connection - WinXP-Portal ... lInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, ... on owningObject, SqlConnectionString connectionOptions, String newPassword, ... ection owningConnection, DbConnectionPool pool, DbConnectionOptions options) ...
    (microsoft.public.sqlserver.setup)
  • MSDE and VDD 2005 conflict?
    ... Dim insertString As String = "INSERT INTO Guests (FirstName, ... Message="An error has occurred while establishing a connection to the ... useFailoverPartner, Boolean& failoverDemandDone, String host, String ... owningObject, SqlConnectionString connectionOptions, String newPassword, ...
    (microsoft.public.dotnet.framework.aspnet)