Hi experts, does anyone know what the root cause of the issue below is? The issue occurs when my website connect to a MS SQL database on another server. It seems to only occur when retrieving data repeatedly during a button click. Retrieving Single data seems to work fine. Also, issue does not occur if database is on the same server as the website.
I'm running MS SQL 2005 with SQL authentication MS server 2003. Im not sure if the is my asp.net2.0 website or the database.
--------------------------
----------
---
Server Error in '/' Application.
--------------------------
----------
----------
----------
----------
----------
----
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)
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.SqlE
xception: 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)
Source Error:
Line 187:
Line 188: // _checkbox.DataSource = command.ExecuteReader(); ;
Line 189: _checkbox.DataBind();
Line 190:
Line 191: _checkbox.Items.Insert(0, "All");
Source File: c:\InetPub\WWWRoot\fivwebs
ite\Oslang
.aspx.cs Line: 189
Stack Trace:
[SqlException (0x80131904): 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.SqlI
nternalCon
nection.On
Error(SqlE
xception exception, Boolean breakConnection) +4844759
System.Data.SqlClient.TdsP
arser.Thro
wException
AndWarning
(TdsParser
StateObjec
t stateObj) +194
System.Data.SqlClient.TdsP
arser.Conn
ect(Server
Info serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +4858065
System.Data.SqlClient.SqlI
nternalCon
nectionTds
.AttemptOn
eLogin(Ser
verInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +90
System.Data.SqlClient.SqlI
nternalCon
nectionTds
.LoginNoFa
ilover(Str
ing host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +376
System.Data.SqlClient.SqlI
nternalCon
nectionTds
.OpenLogin
Enlist(Sql
Connection
owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
System.Data.SqlClient.SqlI
nternalCon
nectionTds
..ctor(DbC
onnectionP
oolIdentit
y identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
System.Data.SqlClient.SqlC
onnectionF
actory.Cre
ateConnect
ion(DbConn
ectionOpti
ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
System.Data.ProviderBase.D
bConnectio
nFactory.C
reateNonPo
oledConnec
tion(DbCon
nection owningConnection, DbConnectionPoolGroup poolGroup) +29
System.Data.ProviderBase.D
bConnectio
nFactory.G
etConnecti
on(DbConne
ction owningConnection) +4861516
System.Data.ProviderBase.D
bConnectio
nClosed.Op
enConnecti
on(DbConne
ction outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlC
onnection.
Open() +122
System.Data.Common.DbDataA
dapter.Qui
etOpen(IDb
Connection
connection, ConnectionState& originalState) +31
System.Data.Common.DbDataA
dapter.Fil
lInternal(
DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +112
System.Data.Common.DbDataA
dapter.Fil
l(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +287
System.Data.Common.DbDataA
dapter.Fil
l(DataSet dataSet, String srcTable) +92
System.Web.UI.WebControls.
SqlDataSou
rceView.Ex
ecuteSelec
t(DataSour
ceSelectAr
guments arguments) +1297
System.Web.UI.WebControls.
ListContro
l.OnDataBi
nding(Even
tArgs e) +95
System.Web.UI.WebControls.
ListContro
l.PerformS
elect() +34
System.Web.UI.WebControls.
BaseDataBo
undControl
.DataBind(
) +73
Oslang.CreateCheckBoxList(
Int32 mySystemID, Int32 myRegionID) in c:\InetPub\WWWRoot\fivwebs
ite\Oslang
.aspx.cs:1
89
Oslang.Page_Load(Object sender, EventArgs e) in c:\InetPub\WWWRoot\fivwebs
ite\Oslang
.aspx.cs:4
9
System.Web.Util.CalliHelpe
r.EventArg
FunctionCa
ller(IntPt
r fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEvent
HandlerDel
egateProxy
.Callback(
Object sender, EventArgs e) +35
System.Web.UI.Control.OnLo
ad(EventAr
gs e) +99
System.Web.UI.Control.Load
Recursive(
) +50
System.Web.UI.Page.Process
RequestMai
n(Boolean includeStagesBeforeAsyncPo
int, Boolean includeStagesAfterAsyncPoi
nt) +627
--------------------------
----------
----------
----------
----------
----------
----
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053