Server Error in '/indiatest' Application.
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:
Line 47: vSQL="select max(pdate) from uploadlog where
logreport='Salesorder Upload Completed'"
Line 48: objCmd = New SqlCommand(vSQL, objConn)
Line 49: objConn.Open()
Line 50: dataReader = objCmd.ExecuteReader()
Line 51:
Source File: D:\indiatest\login1.aspx Line: 49
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) +739123
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj) +188
System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo,
SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64
timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean
integratedSecurity, SqlConnection owningObject) +685966
System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject) +109
System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +383
System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +181
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
ASP.login1_aspx.ftip(Object Src, EventArgs E) in
D:\indiatest\login1.aspx:49
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET
Version:2.0.50727.832
Error you get is all about the connection to your SQL Server instance.
I wish you'd share the Connection String with us. Then it would be easier to
track the path.
Ensure you enter the right info to the Server property in your Connection
String. If your SQL Server instance is a Named instance then you should
enter this info as "ServerName\NamedInstance", if it's a Default Instance
then only the ServerName would be enough.
Is this your server, or a server of a hosting company? If it's yours and
ensure that you set the Firewall settings of the Windows Server to allow the
port that your SQL Server instance uses. And ensure you enabled TCP protocol
and configured it well. Ensure you use a static port for this purpose (if
it's a Default Instance then it'll be using 1433 static port, if it's a
Named Instance then it'll be using a Dynamic Port by default)
Ekrem ?nsoy
"Yogesh Bate" <YogeshBate@.discussions.microsoft.com> wrote in message
news:02D393E8-F9BA-4D5F-9BF3-CD57E336356E@.microsoft.com...
> Server Error in '/indiatest' Application.
> ----
> 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:
>
> Line 47: vSQL="select max(pdate) from uploadlog where
> logreport='Salesorder Upload Completed'"
> Line 48: objCmd = New SqlCommand(vSQL, objConn)
> Line 49: objConn.Open()
> Line 50: dataReader = objCmd.ExecuteReader()
> Line 51:
>
> Source File: D:\indiatest\login1.aspx Line: 49
> 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) +739123
> System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
> stateObj) +188
> System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo,
> SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean
> integratedSecurity, SqlConnection owningObject) +685966
> System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject) +109
> System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> +383
> System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance) +181
> 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
> ASP.login1_aspx.ftip(Object Src, EventArgs E) in
> D:\indiatest\login1.aspx:49
> System.Web.UI.Control.OnLoad(EventArgs e) +99
> System.Web.UI.Control.LoadRecursive() +47
> System.Web.UI.Control.LoadRecursive() +131
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
>
>
> ----
> Version Information: Microsoft .NET Framework Version:2.0.50727.832;
> ASP.NET
> Version:2.0.50727.832
Thursday, March 8, 2012
An error has occurred while establishing a connection to the serve
Labels:
application,
connection,
database,
error,
establishing,
indiatest,
microsoft,
mysql,
occurred,
oracle,
serve,
server,
sql,
whenconnecting
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment