PC Review


Reply
Thread Tools Rate Thread

Connect without async but get timeout error when async=true

 
 
Joseph
Guest
Posts: n/a
 
      6th May 2008
Have an app deployed on a network. On some machines, a regular connection to
the sql server establishes and works great, but the same exact connection
string along with "Asynchronous Processing=true" gives a 'Timeout expired.
The timeout period elapsed prior to completion of the operation or the server
is not responding.' error. I know the timeout setting isn't the actual
issue, and the client machine can demonstrate connectivity to the sql server
manually (and like I mentioned, has no problem connecting without the async).
Is anyone familiar with anything like this?
 
Reply With Quote
 
 
 
 
Joseph
Guest
Posts: n/a
 
      7th May 2008
It's a WinForms application. At one point in the application we do a
connection without async=true and do a few things. For all subsequent
connections, we use an asynchronous connection.

Here's what we're doing:

create a system.data.sqlclient.sqlconnection
set connectionstring equal to something like Persist Security
Info=False;Integrated
Security=SSPI;server=serverxxxx;database=dbxxxx;Asynchronous Processing=true;
try .open
and we're catching an SqlException.

Thanks,
Joseph


"William Vaughn [MVP]" wrote:

> When you change the ConnectionString, you're getting a separate connection
> pool for that connection and any like it. Are you on ASP.NET, Windows Forms
> or something else? The Timeout error on a connection is different than that
> of a command. This looks like a command... Turn on the profiler to see how
> this command is different.
>
> --
> __________________________________________________________________________
> William R. Vaughn
> President and Founder Beta V Corporation
> Author, Mentor, Dad, Grandpa
> Microsoft MVP
> (425) 556-9205 (Pacific time)
> Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
> ____________________________________________________________________________________________
> "Joseph" <(E-Mail Removed)> wrote in message
> news:05BF83F4-6497-4449-B264-(E-Mail Removed)...
> > Have an app deployed on a network. On some machines, a regular connection
> > to
> > the sql server establishes and works great, but the same exact connection
> > string along with "Asynchronous Processing=true" gives a 'Timeout expired.
> > The timeout period elapsed prior to completion of the operation or the
> > server
> > is not responding.' error. I know the timeout setting isn't the actual
> > issue, and the client machine can demonstrate connectivity to the sql
> > server
> > manually (and like I mentioned, has no problem connecting without the
> > async).
> > Is anyone familiar with anything like this?

>

 
Reply With Quote
 
Joseph
Guest
Posts: n/a
 
      7th May 2008
Sorry - I had the password part stripped out - it really is in there. Yes,
definitely using the 2.0 framework all around.

Where my confusion lies is in what the fundamental difference is between
async & non-async that would cause one method to always work and another to
always fail? And why only on certain machines (regardless of the user logged
in)? And why a timeout/not responding error?

Thanks,
Joseph

"William Vaughn [MVP]" wrote:

> So it's a Connection timeout. Ah, are you using the 2.0 Framework (async is
> not supported on 1.0 or 1.1)? Whenever you change the ConnectionString you
> get a new pool but I've done this without incident--but again, only on 2.0
> and later. Ah why are you worried about persist security info? There is no
> password in your CS.
>
> --
> __________________________________________________________________________
> William R. Vaughn
> President and Founder Beta V Corporation
> Author, Mentor, Dad, Grandpa
> Microsoft MVP
> (425) 556-9205 (Pacific time)
> Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
> ____________________________________________________________________________________________
> "Joseph" <(E-Mail Removed)> wrote in message
> news:E94FC234-C1FF-4ACB-A152-(E-Mail Removed)...
> > It's a WinForms application. At one point in the application we do a
> > connection without async=true and do a few things. For all subsequent
> > connections, we use an asynchronous connection.
> >
> > Here's what we're doing:
> >
> > create a system.data.sqlclient.sqlconnection
> > set connectionstring equal to something like Persist Security
> > Info=False;Integrated
> > Security=SSPI;server=serverxxxx;database=dbxxxx;Asynchronous
> > Processing=true;
> > try .open
> > and we're catching an SqlException.
> >
> > Thanks,
> > Joseph
> >
> >
> > "William Vaughn [MVP]" wrote:
> >
> >> When you change the ConnectionString, you're getting a separate
> >> connection
> >> pool for that connection and any like it. Are you on ASP.NET, Windows
> >> Forms
> >> or something else? The Timeout error on a connection is different than
> >> that
> >> of a command. This looks like a command... Turn on the profiler to see
> >> how
> >> this command is different.
> >>
> >> --
> >> __________________________________________________________________________
> >> William R. Vaughn
> >> President and Founder Beta V Corporation
> >> Author, Mentor, Dad, Grandpa
> >> Microsoft MVP
> >> (425) 556-9205 (Pacific time)
> >> Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
> >> ____________________________________________________________________________________________
> >> "Joseph" <(E-Mail Removed)> wrote in message
> >> news:05BF83F4-6497-4449-B264-(E-Mail Removed)...
> >> > Have an app deployed on a network. On some machines, a regular
> >> > connection
> >> > to
> >> > the sql server establishes and works great, but the same exact
> >> > connection
> >> > string along with "Asynchronous Processing=true" gives a 'Timeout
> >> > expired.
> >> > The timeout period elapsed prior to completion of the operation or the
> >> > server
> >> > is not responding.' error. I know the timeout setting isn't the actual
> >> > issue, and the client machine can demonstrate connectivity to the sql
> >> > server
> >> > manually (and like I mentioned, has no problem connecting without the
> >> > async).
> >> > Is anyone familiar with anything like this?
> >>

>

 
Reply With Quote
 
Joseph
Guest
Posts: n/a
 
      8th May 2008
No; all the .net dll's are 2.0.50727. Is this a known issue fixed in 2.1?


"William Vaughn [MVP]" wrote:

> Is the 2.1 framework patch installed on all systems?
>
> --
> __________________________________________________________________________
> William R. Vaughn
> President and Founder Beta V Corporation
> Author, Mentor, Dad, Grandpa
> Microsoft MVP
> (425) 556-9205 (Pacific time)
> Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
> ____________________________________________________________________________________________
> "Joseph" <(E-Mail Removed)> wrote in message
> news:A52BD34D-DD3C-4CA7-AECC-(E-Mail Removed)...
> > Sorry - I had the password part stripped out - it really is in there.
> > Yes,
> > definitely using the 2.0 framework all around.
> >
> > Where my confusion lies is in what the fundamental difference is between
> > async & non-async that would cause one method to always work and another
> > to
> > always fail? And why only on certain machines (regardless of the user
> > logged
> > in)? And why a timeout/not responding error?
> >
> > Thanks,
> > Joseph
> >
> > "William Vaughn [MVP]" wrote:
> >
> >> So it's a Connection timeout. Ah, are you using the 2.0 Framework (async
> >> is
> >> not supported on 1.0 or 1.1)? Whenever you change the ConnectionString
> >> you
> >> get a new pool but I've done this without incident--but again, only on
> >> 2.0
> >> and later. Ah why are you worried about persist security info? There is
> >> no
> >> password in your CS.
> >>
> >> --
> >> __________________________________________________________________________
> >> William R. Vaughn
> >> President and Founder Beta V Corporation
> >> Author, Mentor, Dad, Grandpa
> >> Microsoft MVP
> >> (425) 556-9205 (Pacific time)
> >> Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
> >> ____________________________________________________________________________________________
> >> "Joseph" <(E-Mail Removed)> wrote in message
> >> news:E94FC234-C1FF-4ACB-A152-(E-Mail Removed)...
> >> > It's a WinForms application. At one point in the application we do a
> >> > connection without async=true and do a few things. For all subsequent
> >> > connections, we use an asynchronous connection.
> >> >
> >> > Here's what we're doing:
> >> >
> >> > create a system.data.sqlclient.sqlconnection
> >> > set connectionstring equal to something like Persist Security
> >> > Info=False;Integrated
> >> > Security=SSPI;server=serverxxxx;database=dbxxxx;Asynchronous
> >> > Processing=true;
> >> > try .open
> >> > and we're catching an SqlException.
> >> >
> >> > Thanks,
> >> > Joseph
> >> >
> >> >
> >> > "William Vaughn [MVP]" wrote:
> >> >
> >> >> When you change the ConnectionString, you're getting a separate
> >> >> connection
> >> >> pool for that connection and any like it. Are you on ASP.NET, Windows
> >> >> Forms
> >> >> or something else? The Timeout error on a connection is different than
> >> >> that
> >> >> of a command. This looks like a command... Turn on the profiler to see
> >> >> how
> >> >> this command is different.
> >> >>
> >> >> --
> >> >> __________________________________________________________________________
> >> >> William R. Vaughn
> >> >> President and Founder Beta V Corporation
> >> >> Author, Mentor, Dad, Grandpa
> >> >> Microsoft MVP
> >> >> (425) 556-9205 (Pacific time)
> >> >> Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
> >> >> ____________________________________________________________________________________________
> >> >> "Joseph" <(E-Mail Removed)> wrote in message
> >> >> news:05BF83F4-6497-4449-B264-(E-Mail Removed)...
> >> >> > Have an app deployed on a network. On some machines, a regular
> >> >> > connection
> >> >> > to
> >> >> > the sql server establishes and works great, but the same exact
> >> >> > connection
> >> >> > string along with "Asynchronous Processing=true" gives a 'Timeout
> >> >> > expired.
> >> >> > The timeout period elapsed prior to completion of the operation or
> >> >> > the
> >> >> > server
> >> >> > is not responding.' error. I know the timeout setting isn't the
> >> >> > actual
> >> >> > issue, and the client machine can demonstrate connectivity to the
> >> >> > sql
> >> >> > server
> >> >> > manually (and like I mentioned, has no problem connecting without
> >> >> > the
> >> >> > async).
> >> >> > Is anyone familiar with anything like this?
> >> >>
> >>

>

 
Reply With Quote
 
Joseph
Guest
Posts: n/a
 
      8th May 2008
I should add that the same version (2.0.50727) is on the machines that aren't
having any problems connecting.

"Joseph" wrote:

> No; all the .net dll's are 2.0.50727. Is this a known issue fixed in 2.1?
>
>
> "William Vaughn [MVP]" wrote:
>
> > Is the 2.1 framework patch installed on all systems?
> >
> > --
> > __________________________________________________________________________
> > William R. Vaughn
> > President and Founder Beta V Corporation
> > Author, Mentor, Dad, Grandpa
> > Microsoft MVP
> > (425) 556-9205 (Pacific time)
> > Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
> > ____________________________________________________________________________________________
> > "Joseph" <(E-Mail Removed)> wrote in message
> > news:A52BD34D-DD3C-4CA7-AECC-(E-Mail Removed)...
> > > Sorry - I had the password part stripped out - it really is in there.
> > > Yes,
> > > definitely using the 2.0 framework all around.
> > >
> > > Where my confusion lies is in what the fundamental difference is between
> > > async & non-async that would cause one method to always work and another
> > > to
> > > always fail? And why only on certain machines (regardless of the user
> > > logged
> > > in)? And why a timeout/not responding error?
> > >
> > > Thanks,
> > > Joseph
> > >
> > > "William Vaughn [MVP]" wrote:
> > >
> > >> So it's a Connection timeout. Ah, are you using the 2.0 Framework (async
> > >> is
> > >> not supported on 1.0 or 1.1)? Whenever you change the ConnectionString
> > >> you
> > >> get a new pool but I've done this without incident--but again, only on
> > >> 2.0
> > >> and later. Ah why are you worried about persist security info? There is
> > >> no
> > >> password in your CS.
> > >>
> > >> --
> > >> __________________________________________________________________________
> > >> William R. Vaughn
> > >> President and Founder Beta V Corporation
> > >> Author, Mentor, Dad, Grandpa
> > >> Microsoft MVP
> > >> (425) 556-9205 (Pacific time)
> > >> Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
> > >> ____________________________________________________________________________________________
> > >> "Joseph" <(E-Mail Removed)> wrote in message
> > >> news:E94FC234-C1FF-4ACB-A152-(E-Mail Removed)...
> > >> > It's a WinForms application. At one point in the application we do a
> > >> > connection without async=true and do a few things. For all subsequent
> > >> > connections, we use an asynchronous connection.
> > >> >
> > >> > Here's what we're doing:
> > >> >
> > >> > create a system.data.sqlclient.sqlconnection
> > >> > set connectionstring equal to something like Persist Security
> > >> > Info=False;Integrated
> > >> > Security=SSPI;server=serverxxxx;database=dbxxxx;Asynchronous
> > >> > Processing=true;
> > >> > try .open
> > >> > and we're catching an SqlException.
> > >> >
> > >> > Thanks,
> > >> > Joseph
> > >> >
> > >> >
> > >> > "William Vaughn [MVP]" wrote:
> > >> >
> > >> >> When you change the ConnectionString, you're getting a separate
> > >> >> connection
> > >> >> pool for that connection and any like it. Are you on ASP.NET, Windows
> > >> >> Forms
> > >> >> or something else? The Timeout error on a connection is different than
> > >> >> that
> > >> >> of a command. This looks like a command... Turn on the profiler to see
> > >> >> how
> > >> >> this command is different.
> > >> >>
> > >> >> --
> > >> >> __________________________________________________________________________
> > >> >> William R. Vaughn
> > >> >> President and Founder Beta V Corporation
> > >> >> Author, Mentor, Dad, Grandpa
> > >> >> Microsoft MVP
> > >> >> (425) 556-9205 (Pacific time)
> > >> >> Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
> > >> >> ____________________________________________________________________________________________
> > >> >> "Joseph" <(E-Mail Removed)> wrote in message
> > >> >> news:05BF83F4-6497-4449-B264-(E-Mail Removed)...
> > >> >> > Have an app deployed on a network. On some machines, a regular
> > >> >> > connection
> > >> >> > to
> > >> >> > the sql server establishes and works great, but the same exact
> > >> >> > connection
> > >> >> > string along with "Asynchronous Processing=true" gives a 'Timeout
> > >> >> > expired.
> > >> >> > The timeout period elapsed prior to completion of the operation or
> > >> >> > the
> > >> >> > server
> > >> >> > is not responding.' error. I know the timeout setting isn't the
> > >> >> > actual
> > >> >> > issue, and the client machine can demonstrate connectivity to the
> > >> >> > sql
> > >> >> > server
> > >> >> > manually (and like I mentioned, has no problem connecting without
> > >> >> > the
> > >> >> > async).
> > >> >> > Is anyone familiar with anything like this?
> > >> >>
> > >>

> >

 
Reply With Quote
 
Kurt
Guest
Posts: n/a
 
      16th Jul 2008
I ran into the same issue yesterday and I have not been able to fix it.

Data Source=mySqlServer;Initial Catalog=testDB;User
ID=mytestuser;Password=mytestpassword;Asynchronous Processing=True;Connect
Timeout=1000

Is there any new helpful information anyone could share about this issue?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
writing an async client (sockets/async/thread) asharda@woh.rr.com Microsoft C# .NET 8 17th Mar 2008 11:04 PM
Any harm in using Async=true to sql server 2005 for non-async db calls Chris Becker Microsoft ADO .NET 1 23rd Mar 2007 01:18 AM
help with async = true scenario Colin Robinson Microsoft ADO .NET 3 16th Jan 2006 03:32 AM
Async Timeout events for TCP connections. Mark Smith Microsoft C# .NET 1 16th Jun 2004 07:39 PM
Timeout during Async SQLServer batch Alan Z. Scharf Microsoft ASP .NET 0 19th May 2004 10:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:00 PM.