PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Connect without async but get timeout error when async=true

Reply

Connect without async but get timeout error when async=true

 
Thread Tools Rate Thread
Old 06-05-2008, 09:01 PM   #1
Joseph
Guest
 
Posts: n/a
Default Connect without async but get timeout error when async=true


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
Old 07-05-2008, 07:49 PM   #2
Joseph
Guest
 
Posts: n/a
Default Re: Connect without async but get timeout error when async=true

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" <Joseph@discussions.microsoft.com> wrote in message
> news:05BF83F4-6497-4449-B264-02B87E4F70AC@microsoft.com...
> > 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
Old 07-05-2008, 09:50 PM   #3
Joseph
Guest
 
Posts: n/a
Default Re: Connect without async but get timeout error when async=true

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" <Joseph@discussions.microsoft.com> wrote in message
> news:E94FC234-C1FF-4ACB-A152-21C79CF89C96@microsoft.com...
> > 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" <Joseph@discussions.microsoft.com> wrote in message
> >> news:05BF83F4-6497-4449-B264-02B87E4F70AC@microsoft.com...
> >> > 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
Old 07-05-2008, 11:32 PM   #4
Joseph
Guest
 
Posts: n/a
Default Re: Connect without async but get timeout error when async=true

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" <Joseph@discussions.microsoft.com> wrote in message
> news:A52BD34D-DD3C-4CA7-AECC-E5698BF97995@microsoft.com...
> > 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" <Joseph@discussions.microsoft.com> wrote in message
> >> news:E94FC234-C1FF-4ACB-A152-21C79CF89C96@microsoft.com...
> >> > 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" <Joseph@discussions.microsoft.com> wrote in message
> >> >> news:05BF83F4-6497-4449-B264-02B87E4F70AC@microsoft.com...
> >> >> > 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
Old 07-05-2008, 11:35 PM   #5
Joseph
Guest
 
Posts: n/a
Default Re: Connect without async but get timeout error when async=true

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" <Joseph@discussions.microsoft.com> wrote in message
> > news:A52BD34D-DD3C-4CA7-AECC-E5698BF97995@microsoft.com...
> > > 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" <Joseph@discussions.microsoft.com> wrote in message
> > >> news:E94FC234-C1FF-4ACB-A152-21C79CF89C96@microsoft.com...
> > >> > 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" <Joseph@discussions.microsoft.com> wrote in message
> > >> >> news:05BF83F4-6497-4449-B264-02B87E4F70AC@microsoft.com...
> > >> >> > 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
Old 16-07-2008, 10:13 PM   #6
Kurt
Guest
 
Posts: n/a
Default Re: Connect without async but get timeout error when async=true

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off