473,545 Members | 289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2.0 DataSet Connection Timeout only on first load?

I'm in a strange situation. I have a dataset that uses it own connection
string from MySettings. All is well. This thing works in .NET just dandy.

If I reference this dataset from another project, and load that project
under IIS6/ASP/2003 using COM, it fails with the folowing error on the
FIRST request only:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion exception, Boolean breakConnection )
at System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje ct stateObj)
at System.Data.Sql Client.TdsParse rStateObject.Re adSniError(TdsP arserStateObjec t stateObj, UInt32 error)
at System.Data.Sql Client.TdsParse rStateObject.Re adSni(DbAsyncRe sult asyncResult, TdsParserStateO bject stateObj)
at System.Data.Sql Client.TdsParse rStateObject.Re adPacket(Int32 bytesExpected)
at System.Data.Sql Client.TdsParse r.ConsumePreLog inHandshake(Boo lean encrypt, Boolean trustServerCert , Boolean& marsCapable)
at System.Data.Sql Client.TdsParse r.Connect(Boole an& useFailoverPart ner, Boolean& failoverDemandD one, String host, String failoverPartner , String protocol, SqlInternalConn ectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert , Boolean integratedSecur ity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.Sql Client.SqlInter nalConnectionTd s.OpenLoginEnli st(SqlConnectio n owningObject, SqlConnectionSt ring connectionOptio ns, String newPassword, Boolean redirectedUserI nstance)
at System.Data.Sql Client.SqlInter nalConnectionTd s..ctor(DbConne ctionPoolIdenti ty identity, SqlConnectionSt ring connectionOptio ns, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserI nstance)
at System.Data.Sql Client.SqlConne ctionFactory.Cr eateConnection( DbConnectionOpt ions options, Object poolGroupProvid erInfo, DbConnectionPoo l pool, DbConnection owningConnectio n)
at System.Data.Pro viderBase.DbCon nectionFactory. CreatePooledCon nection(DbConne ction owningConnectio n, DbConnectionPoo l pool, DbConnectionOpt ions options)
at System.Data.Pro viderBase.DbCon nectionPool.Cre ateObject(DbCon nection owningObject)
at System.Data.Pro viderBase.DbCon nectionPool.Use rCreateRequest( DbConnection owningObject)
at System.Data.Pro viderBase.DbCon nectionPool.Get Connection(DbCo nnection owningObject)
at System.Data.Pro viderBase.DbCon nectionFactory. GetConnection(D bConnection owningConnectio n)
at System.Data.Pro viderBase.DbCon nectionClosed.O penConnection(D bConnection outerConnection , DbConnectionFac tory connectionFacto ry)
at System.Data.Sql Client.SqlConne ction.Open()
at System.Data.Com mon.DbDataAdapt er.FillInternal (DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Com mon.DbDataAdapt er.Fill(DataTab le[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable)
at SRE.MySummitTab leAdapters.User sTableAdapter.G etUserById(Guid Id)
at SRE.MembershipP roviders.HPMemb ershipProvider. GetUser(String username, Boolean userIsOnline)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

All subsequent request to this dataset works just fine, so the sql
server IS there, and connecting just dandy.

In this instance above, all the data is doing is returning a single row
using a custom query on the table adapter. The part that throw an
exception the first time is this sequence:
Dim usersAdapter As New MyStuffTableAda pters.UsersTabl eAdapter
Dim users As MyStuff.UsersDa taTable = usersAdapter.Ge tUserById(userI d)
Even if I set the connection manually:
Dim usersAdapter As New MySummitTableAd apters.UsersTab leAdapter
usersAdapter.Co nnection = New Data.SqlClient. SqlConnection(C onfigurationMan ager.Connection Strings("MyStuf f").ConnectionS tring)
Dim users As MySummit.UsersD ataTable = usersAdapter.Ge tUserById(userI d)
it still throws the above timeout error on the first request only.
To make matters ever more strange:
Dim usersAdapter As New MyStuffTableAda pters.UsersTabl eAdapter
Debug.WriteLine (usersAdapter.C onnection.Conne ctionString)
Dim users As MyStuff.UsersDa taTable = usersAdapter.Ge tUserById(userI d)


The second line there prints the correct connection string, the one used
everywhere else... the same one that works for all request but the
first... so the value IS getting loaded... Of course, as soon as we call
the GetUserById method, we get the connection timeout above.. on the
first request.

Just to reinforce matters, on the first request after unloading all
sites fails with the connection timeout errors above, but an SQL
Profiler trace shows not connection attempt is made at all. For the
second and subsqeuent requests, the dataset queries work just fine, and
the SQL profile trace shows their activity.

At this point, I'm stumped. I don't know what is going on, or how to
prevent the data from crapping out on the first request.

Any ideas?

-=Chris
Mar 23 '06 #1
0 2167

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

Similar topics

0
1333
by: SPD | last post by:
I've been researching this issue with little luck. Here's the situation: We have a few users on slow dialup connections who are posting data from forms. Frequently, they get script timeout errors. We've gotten timeouts from users with faster connections as well, so I suspected that the overall load is overtaxing the server. But it does...
1
2009
by: cindy | last post by:
Get data into datatable, add to dataset dsSearch " Get data into datatable, add to dataset dsSearch Using In-Memory SQL Engine join the tables and select the filenames from the join, add to dataset dsSearch CODE ON http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=3994&lngWId=10 using SQL connection get data from view...
0
4909
by: Vijay Balki | last post by:
I am fetching data in DataSet - myDataSet, from a remote database using a Web Service in my VB.NET client..Once I fetch it I store the data in XML file (myXMLFile) using the WriteXML method of the myDataSet. The connection to the Web Service is closed at this point. I update this XML file in my application, and when I am ready to send the...
3
17640
by: Robert Brown | last post by:
Hi All.. I am experiencing Timeouts after about 30-40 seconds when trying to fill a dataset from SQL. I have seen a lot of posts mentioning to set the commandtimeout property, but how do you do that on an SQLAdapter? I setting a connection timeout on the SQL Connector, but that didn't help. Here is my code.. Can anyone help???? BTW: I...
6
2457
by: Laura K | last post by:
This is probably a simple question but I want to make sure I am doing it right. I have a spoc with two select statements which results in two tables. Very Basic --------------------------------------------------------------------------------- @strProductCode nvarchar (50)
3
10280
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database I use System.Data.Common.DBConnection and .DBCommand. How can I keep aware from connection losses (network not availeable, db-server not...
2
2305
by: Scotty | last post by:
I get stuck to write an update, insert and delete command, i am looking for some help to start Whats the best way to update 2 tables toe the database (Access) below my code used to load my data.(2 tables) Do someone has a good sample code to help me? Many thanks in advance, Marc.
7
2749
by: =?Utf-8?B?Sm9obiBTdGFnZ3M=?= | last post by:
Hello, Please read this all before giving an answer :) I'm doing some troubleshooting on a web application that my company wrote. It's written in asp.net 1.1. The error that the Event viewer gives is: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled...
0
1641
by: rickbear | last post by:
Hi group... I am having big difficulties with dataset and xsd schemas. First I dedicate a specific schema to a dataset. Then I use an adapter to fill each table in the dataset. But the problem is, when I use the write or getxml on the dataset, the result is NOT like the schema I provided the dataset which I think should not be possible. I...
0
7398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7416
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7752
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5969
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5325
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4944
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.