By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,977 Members | 1,369 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,977 IT Pros & Developers. It's quick & easy.

installed 2.0.50727 now I get a sql express error message

P: n/a
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.OnErro r(SqlException
exception, Boolean breakConnection) +734995

System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(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.Ope nLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +628

System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170

System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +359

System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(Data Set 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
Dec 18 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Please see
http://codebetter.com/blogs/sahil.ma...05/134318.aspx

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
__________________________________________________ ________
"deltalimagolf" <de***********@discussions.microsoft.com> wrote in message
news:6D**********************************@microsof t.com...
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.OnErro r(SqlException
exception, Boolean breakConnection) +734995

System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(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.Ope nLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +628

System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo,
String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
+170

System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +359

System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(Data Set 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

Dec 18 '05 #2

P: n/a
The only thing installed on the deployment server is the .net 2.0 framework.
Nothing sql server 2005 has been installed.

"Sahil Malik [MVP C#]" wrote:
Please see
http://codebetter.com/blogs/sahil.ma...05/134318.aspx

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
__________________________________________________ ________
"deltalimagolf" <de***********@discussions.microsoft.com> wrote in message
news:6D**********************************@microsof t.com...
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.OnErro r(SqlException
exception, Boolean breakConnection) +734995

System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(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.Ope nLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +628

System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo,
String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
+170

System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +359

System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(Data Set 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


Dec 18 '05 #3

P: n/a
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.ma.../13/63199.aspx
__________________________________________________ ________
"deltalimagolf" <de***********@discussions.microsoft.com> wrote in message
news:CE**********************************@microsof t.com...
The only thing installed on the deployment server is the .net 2.0
framework.
Nothing sql server 2005 has been installed.

"Sahil Malik [MVP C#]" wrote:
Please see
http://codebetter.com/blogs/sahil.ma...05/134318.aspx

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
__________________________________________________ ________
"deltalimagolf" <de***********@discussions.microsoft.com> wrote in
message
news:6D**********************************@microsof t.com...
>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.OnErro r(SqlException
> exception, Boolean breakConnection) +734995
>
> System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(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.Ope nLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String
> newPassword,
> Boolean redirectedUserInstance) +628
>
> System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
> identity, SqlConnectionString connectionOptions, Object providerInfo,
> String
> newPassword, SqlConnection owningObject, Boolean
> redirectedUserInstance)
> +170
>
> System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool,
> DbConnection
> owningConnection) +359
>
> System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection
> owningConnection, DbConnectionPool pool, DbConnectionOptions options)
> +28
> System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
> owningObject) +424
>
> System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
> owningObject) +66
> System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
> owningObject) +496
>
> System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
> owningConnection) +82
>
> System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> System.Data.SqlClient.SqlConnection.Open() +111
> System.Data.Common.DbDataAdapter.FillInternal(Data Set 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


Dec 19 '05 #4

P: n/a
I'm attempting to connect to a sql server 2000 database located on another
machine.

"Sahil Malik [MVP C#]" wrote:
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.ma.../13/63199.aspx
__________________________________________________ ________
"deltalimagolf" <de***********@discussions.microsoft.com> wrote in message
news:CE**********************************@microsof t.com...
The only thing installed on the deployment server is the .net 2.0
framework.
Nothing sql server 2005 has been installed.

"Sahil Malik [MVP C#]" wrote:
Please see
http://codebetter.com/blogs/sahil.ma...05/134318.aspx

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
__________________________________________________ ________
"deltalimagolf" <de***********@discussions.microsoft.com> wrote in
message
news:6D**********************************@microsof t.com...
>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.OnErro r(SqlException
> exception, Boolean breakConnection) +734995
>
> System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(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.Ope nLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String
> newPassword,
> Boolean redirectedUserInstance) +628
>
> System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
> identity, SqlConnectionString connectionOptions, Object providerInfo,
> String
> newPassword, SqlConnection owningObject, Boolean
> redirectedUserInstance)
> +170
>
> System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool,
> DbConnection
> owningConnection) +359
>
> System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection
> owningConnection, DbConnectionPool pool, DbConnectionOptions options)
> +28
> System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
> owningObject) +424
>
> System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
> owningObject) +66
> System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
> owningObject) +496
>
> System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
> owningConnection) +82
>
> System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> System.Data.SqlClient.SqlConnection.Open() +111
> System.Data.Common.DbDataAdapter.FillInternal(Data Set 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


Dec 19 '05 #5

P: n/a
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

"deltalimagolf" <de***********@discussions.microsoft.com> schrieb im
Newsbeitrag news:3E**********************************@microsof t.com...
I'm attempting to connect to a sql server 2000 database located on another
machine.

"Sahil Malik [MVP C#]" wrote:
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.ma.../13/63199.aspx
__________________________________________________ ________
"deltalimagolf" <de***********@discussions.microsoft.com> wrote in
message
news:CE**********************************@microsof t.com...
> The only thing installed on the deployment server is the .net 2.0
> framework.
> Nothing sql server 2005 has been installed.
>
> "Sahil Malik [MVP C#]" wrote:
>
>> Please see
>> http://codebetter.com/blogs/sahil.ma...05/134318.aspx
>>
>> - Sahil Malik [MVP]
>> ADO.NET 2.0 book -
>> http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
>> __________________________________________________ ________
>>
>>
>> "deltalimagolf" <de***********@discussions.microsoft.com> wrote in
>> message
>> news:6D**********************************@microsof t.com...
>> >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.OnErro r(SqlException
>> > exception, Boolean breakConnection) +734995
>> >
>> > System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(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.Ope nLoginEnlist(SqlConnection
>> > owningObject, SqlConnectionString connectionOptions, String
>> > newPassword,
>> > Boolean redirectedUserInstance) +628
>> >
>> > System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
>> > identity, SqlConnectionString connectionOptions, Object
>> > providerInfo,
>> > String
>> > newPassword, SqlConnection owningObject, Boolean
>> > redirectedUserInstance)
>> > +170
>> >
>> > System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
>> > options, Object poolGroupProviderInfo, DbConnectionPool pool,
>> > DbConnection
>> > owningConnection) +359
>> >
>> > System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection
>> > owningConnection, DbConnectionPool pool, DbConnectionOptions
>> > options)
>> > +28
>> >
>> > System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
>> > owningObject) +424
>> >
>> > System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
>> > owningObject) +66
>> >
>> > System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
>> > owningObject) +496
>> >
>> > System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
>> > owningConnection) +82
>> >
>> > System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
>> > outerConnection, DbConnectionFactory connectionFactory) +105
>> > System.Data.SqlClient.SqlConnection.Open() +111
>> > System.Data.Common.DbDataAdapter.FillInternal(Data Set 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
>>
>>
>>


Dec 21 '05 #6

P: n/a
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

Jan 17 '06 #7

P: 1
I was getting this exception until I opened a hole in the server machine's firewall for sqlservr.exe (executable for SQL Server 2000's MSSQLSERVER service). I also had the same (apparently very versatile) exception when mistakenly using "uid" instead of "user id" in an SQL Server 2000 connection string.

Hope that helps someone - Thomas, the problem you're having with not working from a remote server sounds very similar to the setup I had.
Feb 10 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.