From: Michal Valent on
Hello,
I have full SQL 2008 server on Windows 2008 server
and try to connect via ADO NET, ASP NET application on IIS7

protected void Application_BeginRequest(Object sender, EventArgs e)
{
..
..
..
try
{
string ent = SPUZ.classes.Globals.ent();
conString = Globals.Decrypt(conString, ent);
SqlConnection con = new SqlConnection(conString);
con.Open();
HttpContext.Current.Items.Add("con", con);
SqlCommand command = con.CreateCommand();
command.CommandText = "SET DATEFORMAT ymd";
command.ExecuteNonQuery();
}
catch (Exception ex)
{

sometimes I get :

Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.

but at this time the server is up and running.

Can someone help me to find what is going on ?
thanks
miso

From: Uri Dimant on
Michael
If you set up connection.tmeout=0 are you still seeing the error?


"Michal Valent" <valent(a)spirit.sk> wrote in message
news:0D140B6E-3A6A-429E-B692-0C69BD8BDC5C(a)microsoft.com...
> Hello,
> I have full SQL 2008 server on Windows 2008 server
> and try to connect via ADO NET, ASP NET application on IIS7
>
> protected void Application_BeginRequest(Object sender, EventArgs e)
> {
> .
> .
> .
> try
> {
> string ent = SPUZ.classes.Globals.ent();
> conString = Globals.Decrypt(conString, ent);
> SqlConnection con = new SqlConnection(conString);
> con.Open();
> HttpContext.Current.Items.Add("con", con);
> SqlCommand command = con.CreateCommand();
> command.CommandText = "SET DATEFORMAT ymd";
> command.ExecuteNonQuery();
> }
> catch (Exception ex)
> {
>
> sometimes I get :
>
> Timeout expired. The timeout period elapsed prior to completion of the
> operation or the server is not responding.
>
> but at this time the server is up and running.
>
> Can someone help me to find what is going on ?
> thanks
> miso


From: Andrew J. Kelly on
Please don't post independently in separate newsgroups. You can add
multiple newsgroups to the header and then all the answers appear as one.
See my reply in the other newsgroup.


--

Andrew J. Kelly SQL MVP
Solid Quality Mentors

"Michal Valent" <valent(a)spirit.sk> wrote in message
news:0D140B6E-3A6A-429E-B692-0C69BD8BDC5C(a)microsoft.com...
> Hello,
> I have full SQL 2008 server on Windows 2008 server
> and try to connect via ADO NET, ASP NET application on IIS7
>
> protected void Application_BeginRequest(Object sender, EventArgs e)
> {
> .
> .
> .
> try
> {
> string ent = SPUZ.classes.Globals.ent();
> conString = Globals.Decrypt(conString, ent);
> SqlConnection con = new SqlConnection(conString);
> con.Open();
> HttpContext.Current.Items.Add("con", con);
> SqlCommand command = con.CreateCommand();
> command.CommandText = "SET DATEFORMAT ymd";
> command.ExecuteNonQuery();
> }
> catch (Exception ex)
> {
>
> sometimes I get :
>
> Timeout expired. The timeout period elapsed prior to completion of the
> operation or the server is not responding.
>
> but at this time the server is up and running.
>
> Can someone help me to find what is going on ?
> thanks
> miso

From: Michal Valent on
Sorry.
miso

"Andrew J. Kelly" <sqlmvpnooospam(a)shadhawk.com> wrote in message
news:uBXFzslfKHA.4592(a)TK2MSFTNGP06.phx.gbl...
> Please don't post independently in separate newsgroups. You can add
> multiple newsgroups to the header and then all the answers appear as one.
> See my reply in the other newsgroup.
>
>
> --
>
> Andrew J. Kelly SQL MVP
> Solid Quality Mentors
>
> "Michal Valent" <valent(a)spirit.sk> wrote in message
> news:0D140B6E-3A6A-429E-B692-0C69BD8BDC5C(a)microsoft.com...
>> Hello,
>> I have full SQL 2008 server on Windows 2008 server
>> and try to connect via ADO NET, ASP NET application on IIS7
>>
>> protected void Application_BeginRequest(Object sender, EventArgs e)
>> {
>> .
>> .
>> .
>> try
>> {
>> string ent = SPUZ.classes.Globals.ent();
>> conString = Globals.Decrypt(conString, ent);
>> SqlConnection con = new SqlConnection(conString);
>> con.Open();
>> HttpContext.Current.Items.Add("con", con);
>> SqlCommand command = con.CreateCommand();
>> command.CommandText = "SET DATEFORMAT ymd";
>> command.ExecuteNonQuery();
>> }
>> catch (Exception ex)
>> {
>>
>> sometimes I get :
>>
>> Timeout expired. The timeout period elapsed prior to completion of the
>> operation or the server is not responding.
>>
>> but at this time the server is up and running.
>>
>> Can someone help me to find what is going on ?
>> thanks
>> miso
>

From: Michal Valent on
I did not try it yet.
It seems to me that this can be associated with ADO.NET connection pooling.
Another attempt with the same application
immediatelly after the Timeout expired exception is successfull.
miso

"Uri Dimant" <urid(a)iscar.co.il> wrote in message
news:eRPuuhlfKHA.2160(a)TK2MSFTNGP02.phx.gbl...
> Michael
> If you set up connection.tmeout=0 are you still seeing the error?
>
>
> "Michal Valent" <valent(a)spirit.sk> wrote in message
> news:0D140B6E-3A6A-429E-B692-0C69BD8BDC5C(a)microsoft.com...
>> Hello,
>> I have full SQL 2008 server on Windows 2008 server
>> and try to connect via ADO NET, ASP NET application on IIS7
>>
>> protected void Application_BeginRequest(Object sender, EventArgs e)
>> {
>> .
>> .
>> .
>> try
>> {
>> string ent = SPUZ.classes.Globals.ent();
>> conString = Globals.Decrypt(conString, ent);
>> SqlConnection con = new SqlConnection(conString);
>> con.Open();
>> HttpContext.Current.Items.Add("con", con);
>> SqlCommand command = con.CreateCommand();
>> command.CommandText = "SET DATEFORMAT ymd";
>> command.ExecuteNonQuery();
>> }
>> catch (Exception ex)
>> {
>>
>> sometimes I get :
>>
>> Timeout expired. The timeout period elapsed prior to completion of the
>> operation or the server is not responding.
>>
>> but at this time the server is up and running.
>>
>> Can someone help me to find what is going on ?
>> thanks
>> miso
>
>