I now get the following error message after copying an asp.net application to
the deployment web server. I don't have SQLExpress or any version of SQL
2005 installed. I found the "LocalSQLServer" connection string in the
machine.config, changed that to look at a SQL 2000 database, but the error
still comes up.
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)
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: 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 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): 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)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +734995
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +188
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) +820
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +359
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32
startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
+162
System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +107
TIA,
Dave
Sahil Malik [MVP C#] - 18 Dec 2005 07:55 GMT
Please see
http://codebetter.com/blogs/sahil.malik/archive/2005/11/05/134318.aspx
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
__________________________________________________________
>I now get the following error message after copying an asp.net application
>to
[quoted text clipped - 92 lines]
> TIA,
> Dave
deltalimagolf - 18 Dec 2005 19:09 GMT
The only thing installed on the deployment server is the .net 2.0 framework.
Nothing sql server 2005 has been installed.
> Please see
> http://codebetter.com/blogs/sahil.malik/archive/2005/11/05/134318.aspx
[quoted text clipped - 100 lines]
> > TIA,
> > Dave
Sahil Malik [MVP C#] - 18 Dec 2005 23:54 GMT
Right but network connections are disabled by default on certain editions of
SQL Server. This has nothing to do with the framework.
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
__________________________________________________________
> The only thing installed on the deployment server is the .net 2.0
> framework.
[quoted text clipped - 123 lines]
>> > TIA,
>> > Dave
deltalimagolf - 19 Dec 2005 17:10 GMT
I'm attempting to connect to a sql server 2000 database located on another
machine.
> Right but network connections are disabled by default on certain editions of
> SQL Server. This has nothing to do with the framework.
[quoted text clipped - 131 lines]
> >> > TIA,
> >> > Dave
Thomas Dallmeier - 21 Dec 2005 11:51 GMT
Hi,
I have the same problem calling an sql server 2000 from a remote server.
If I use the internall test server it works but if I use IIS it doesn't
work.
Thomas
> I'm attempting to connect to a sql server 2000 database located on another
> machine.
[quoted text clipped - 149 lines]
>> >> > TIA,
>> >> > Dave
russ - 17 Jan 2006 17:28 GMT
We are having the same issue when connecting to SQl Server 2000 -
Though on the development box I am using it did originally have 2005
express installed