This is a migrated thread and some comments may be shown as answers.

SQL Azure Context Getting Forcibly Closed

1 Answer 40 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brent
Top achievements
Rank 2
Brent asked on 12 Feb 2012, 06:07 PM
     I have a WPF application where I have implemented a context Factory.  The context factory keeps a class level variable holding an instance of the context.  I have been recently testing against azure and have run into the fact the sql azure will forcibly close the connection if there has been no activity within 60 seconds which results in an exception being thrown (naturally) when I try to use the context again.  I am looking at the best way to work through this.  
  1. In the API documentation I see a section for ContextExceptionEventHandler but do not actually see this implemented when I browse through the class object model.  My thought is I could catch the appropriate exception if the connection was forcibly closed and reopen.  Can you give an example (In VB) how to use this?
  2. I have tried playing with the test when IDLE connection pool settings but they do not see to have an effect.  This could be because I am not closing my connection for it to be put into an idle state within the pool.
  3. Any other suggestions for how to solve for this issue when using Azure?


Brent 
   

1 Answer, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 13 Feb 2012, 04:53 PM
Hello Brent,
it is the best to use the ado connection pool instead of the OpenAccess pool.

Please have a look here to setup the backend configuration.

All the best,
Jan Blessenohl
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Databases and Data Types
Asked by
Brent
Top achievements
Rank 2
Answers by
Jan Blessenohl
Telerik team
Share this question
or