Looking at the forums this seems to be a hardy perennial -
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
I am running a very long SQL Sproc (12 minutes or so) and I simply wanted DNN to wait until this is finished, but this timout appeared after about 30 seconds and the error message appeared.
I have set every timeout setting that I know:-
mobjScriptManager = ScriptManager.GetCurrent(Me.Page)
mobjScriptManager.AsyncPostBackTimeout = 3000
Server.ScriptTimeout = 3000
Page.Session.Timeout() = 3000
my connection string is set to :
"Data Source=nn.nnn.nn.nn;Initial Catalog=NNNNNNN;Persist Security Info=True;User ID=XXXX;Password=XXXXXXX;Connect Timeout=30000;pooling=true;Max Pool Size=200"
I checked out my Scheduler but made no changes to any of the tasks (some were every 2 minutes).
I checked out the Log file but there was nothing untoward there or on the limits.
Finally I took the call to the Sproc out of using my DNN Provider and made my own connection thus:-
sSqlConnectionString = itProject_GetDBConnectionSettings(gstrMISC_CONNECTIONSTRING) ' get web config connection setting
strSQLCmd = "itproject_TS_Create_MembersAndContacts " & _
"'" & Country & "'" & _
", " & _
PartnerId) & _
", " & _
& Language & _
", " & _
intBlockNumber
SqlConn = New SqlConnection(sSqlConnectionString)
SqlCmd = New SqlCommand(strSQLCmd, SqlConn)
SqlCmd.CommandTimeout = 0 ' <<<<<< This is what made it WORK! <<<<<<<<<<<<<<<<
SqlCmd.CommandType = CommandType.Text
SqlConn.Open()
SqlCmd.ExecuteNonQuery() ' This is where it runs the 12-15 minute Sproc and where it Timed Out
SqlConn.Close()
[PS Initially, I did try changing the Connection String to 0 from 30000 but it had no effect and still timed out.]
Hope this helps other developers. - Nick Chance, itProject, North Sydney