473,385 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Arggg SqlDataSource timing out??

In Design mode I open up the SqlDataSource (Configure Data Source)
I go all the way through until the last page where you "Test Query" and
it takes about 2 seconds to return a response.

My workstation is in California
The ASP Server is in California

The Database I'm tapping into is in Chicago

When I press Ctrl-F5 in the Visual Studio 2005 a blank Internet
Explorer launches, with the caption across the bottom.. "Opening
page.."

What I don't understand is why it works in the Design environment, but
once the page is deployed it times out.

How do you troubleshoot this to fix it ?
Eventually the following dumps:

Server Error in '/ABC/TestSite' Application.
--------------------------------------------------------------------------------

Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
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: Timeout expired.
The timeout period elapsed prior to completion of the operation or the
server is not responding.

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): Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding.]
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection) +735091

System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj) +188

System.Data.SqlClient.TdsParserStateObject.ReadSni Error(TdsParserStateObject
stateObj, UInt32 error) +556
System.Data.SqlClient.TdsParserStateObject.ReadSni (DbAsyncResult
asyncResult, TdsParserStateObject stateObj) +164
System.Data.SqlClient.TdsParserStateObject.ReadPac ket(Int32
bytesExpected) +34
System.Data.SqlClient.TdsParser.ConsumePreLoginHan dshake(Boolean
encrypt, Boolean trustServerCert, Boolean& marsCapable) +73
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)
+911

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(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable) +83

System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments
arguments) +1770
System.Web.UI.WebControls.ListControl.OnDataBindin g(EventArgs e) +92
System.Web.UI.WebControls.ListControl.PerformSelec t() +31
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
System.Web.UI.WebControls.ListControl.OnPreRender( EventArgs e) +26
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1360


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42

May 15 '06 #1
8 1807
Just a side note, I use supplied credentials for the SQL Server. I
don't have the SqlDataSource using Windows Authentication.

May 15 '06 #2
Are you using an IP address for the remote server in the connection string?
<ci******@hotmail.com> wrote in message
news:11*********************@v46g2000cwv.googlegro ups.com...
In Design mode I open up the SqlDataSource (Configure Data Source)
I go all the way through until the last page where you "Test Query" and
it takes about 2 seconds to return a response.

My workstation is in California
The ASP Server is in California

The Database I'm tapping into is in Chicago

When I press Ctrl-F5 in the Visual Studio 2005 a blank Internet
Explorer launches, with the caption across the bottom.. "Opening
page.."

What I don't understand is why it works in the Design environment, but
once the page is deployed it times out.

How do you troubleshoot this to fix it ?
Eventually the following dumps:

Server Error in '/ABC/TestSite' Application.
--------------------------------------------------------------------------------

Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
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: Timeout expired.
The timeout period elapsed prior to completion of the operation or the
server is not responding.

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): Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding.]
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection) +735091

System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj) +188

System.Data.SqlClient.TdsParserStateObject.ReadSni Error(TdsParserStateObject
stateObj, UInt32 error) +556
System.Data.SqlClient.TdsParserStateObject.ReadSni (DbAsyncResult
asyncResult, TdsParserStateObject stateObj) +164
System.Data.SqlClient.TdsParserStateObject.ReadPac ket(Int32
bytesExpected) +34
System.Data.SqlClient.TdsParser.ConsumePreLoginHan dshake(Boolean
encrypt, Boolean trustServerCert, Boolean& marsCapable) +73
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)
+911

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(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable) +83

System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments
arguments) +1770
System.Web.UI.WebControls.ListControl.OnDataBindin g(EventArgs e) +92
System.Web.UI.WebControls.ListControl.PerformSelec t() +31
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
System.Web.UI.WebControls.ListControl.OnPreRender( EventArgs e) +26
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1360


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42

May 15 '06 #3
No, using a DNS name. Good call though. I replaced the name with the
IP of the Server, works in Design Environment but not on the actual
page when you press Ctrl-F5 to run it.

May 15 '06 #4
Show your connection string
<ci******@hotmail.com> wrote in message
news:11*********************@y43g2000cwc.googlegro ups.com...
No, using a DNS name. Good call though. I replaced the name with the
IP of the Server, works in Design Environment but not on the actual
page when you press Ctrl-F5 to run it.

May 15 '06 #5
The connection string looks something like this:

Data Source=192.168.100.115;Initial Catalog=TestDatabase;Persist
Security Info=True;User ID=ITWebApps;Password=12345

By the way, thanks for the help so far. =)

May 16 '06 #6
That's an internal (intranet) ip address it appears, just so you know. Are
you on a wide area network? Can you ping that ip address?

Can you use Query Analyzer to connect, using those credentials?

Jeff
<ci******@hotmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
The connection string looks something like this:

Data Source=192.168.100.115;Initial Catalog=TestDatabase;Persist
Security Info=True;User ID=ITWebApps;Password=12345

By the way, thanks for the help so far. =)

May 16 '06 #7
I can ping the remote SQL Server just fine.

I can also use Query Analyzer to connect to it using those credentials.

My workstation and the ASP Server are here in the local building, the
SQL Server is about half way across the U.S. but connected through our
company WAN.

If I write a custom class and using the System.Data.SqlClient objects I
can access the database just fine. However, I have several controls on
forms that are databound and I really don't feel like writing custom
code for something that I should be able to use the SqlDataSource
control with. =D

So.. in my opinion it has something to do with the SqlDataSource
control, but I can't quite put my finger on it yet. When I configure
the SqlDataSource control in my design environment, using the
credentials mentioned above, it runs just fine when I click the "Test
Query" button.

Press Ctrl-F5 and the page spins and eventually times out per the
message in the first post above. :/

It's a tricky one.

May 16 '06 #8
In my research I ran across a post in the newsgroups that said to add
this to the connection string:
connection timeout=60

So I did.. and waited.. and waited.. and waited.. did I say I waited?
...and eventually it kicked in and loaded data.

I'm guessing it's cached some how now, as when I exit and run it
again.. all controls that use that connection string on varoius pages
load super fast.

Thanks for being a team player and helping out!

May 16 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Martin Bischoff | last post by:
Hi, is it possible to modify the values of a SqlDataSource's select parameters in the code behind before the select command is executed? Example: I have an SqlDataSource with a...
8
by: Mike Kelly | last post by:
I've chosen to implement the "optimistic concurrency" model in my application. To assist in that, I've added a ROWVERSION (TIMESTAMP) column to my main tables. I read the value of the column in my...
0
by: Michael Kellogg | last post by:
I have a problem wherein a query that updates a GridView doesn't seem to really stay in sync with a label I have above the GridView. I have a GridView object that I'm updating with information...
2
by: djc | last post by:
1) I am wondering if I should be using an sqlDataSource object for my particular scenario. I need to loop through a listbox and perform an INSERT sql operation for each item. Could be a few or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.