Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

past comprehension - Timeout expired. SQL server 2008, ADO NET, IIS

5 views
Skip to first unread message

Michal Valent

unread,
Dec 16, 2009, 7:47:00 AM12/16/09
to
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

Andrew J. Kelly

unread,
Dec 16, 2009, 9:18:23 AM12/16/09
to

Do you have the instance enabled for remote connections? Do you have TCPIP
enabled? And finally can you connect with SSMS remotely as well?

http://www.kbalertz.com/Feedback_914277.aspx


--

Andrew J. Kelly SQL MVP
Solid Quality Mentors

"Michal Valent" <val...@spirit.sk> wrote in message
news:4D09B2A4-88DB-4461...@microsoft.com...

Michal Valent

unread,
Dec 16, 2009, 9:50:54 AM12/16/09
to
Hello Andrew,
the IIS and the SQL server are on the same computer.
miso

"Andrew J. Kelly" <sqlmvpn...@shadhawk.com> wrote in message
news:uHilaqlf...@TK2MSFTNGP04.phx.gbl...

Andrew J. Kelly

unread,
Dec 16, 2009, 2:55:45 PM12/16/09
to
Well it may try to use shared memory then but I am not sure if that is how
IIS will work or not. In any case can you print out the connection string?
You might have something in there that can explain it. Are you sure you have
the correct instance etc?

--

Andrew J. Kelly SQL MVP
Solid Quality Mentors

"Michal Valent" <val...@spirit.sk> wrote in message

news:ePR$A7lfKH...@TK2MSFTNGP02.phx.gbl...

Michal Valent

unread,
Dec 17, 2009, 3:04:21 AM12/17/09
to
server=myServer;database=myDB;uid=myUser;pwd=myPswd;
I will try to experiment with conn string and ADO.NET IIS connection
pooling.
miso

"Andrew J. Kelly" <sqlmvpn...@shadhawk.com> wrote in message

news:epge7mof...@TK2MSFTNGP06.phx.gbl...

Andrew J. Kelly

unread,
Dec 17, 2009, 9:49:45 AM12/17/09
to
Well I was hoping for the actual connection string as it gets printed out
minus the login & pwd of course. Chances are the instance name is wrong. Is
this a default instance or a named instance? Is it using the default port or
a custom one? Have you tried using the IP address and port number instead
of the name of the instance?

--

Andrew J. Kelly SQL MVP
Solid Quality Mentors

"Michal Valent" <val...@spirit.sk> wrote in message

news:OrcXe8uf...@TK2MSFTNGP04.phx.gbl...

Michal Valent

unread,
Dec 21, 2009, 2:54:11 AM12/21/09
to
Definitelly this timeout has to do with IIS worker process idle mode.
The wake up of IIS worker process and the following attempt connect to the
database,
takes more than 15 seconds.
miso

"Andrew J. Kelly" <sqlmvpn...@shadhawk.com> wrote in message

news:%23i$UmgyfK...@TK2MSFTNGP02.phx.gbl...

0 new messages