You are getting a timeout error and want to increase the timeout to run a stored procedure or a query.
The Web.config of your application specifies a httpRuntime element where you can specify the executionTimeout attribute. For more details see:
You can also set the SQL Server Query timeout. In the SQL Server Enterprise Manager, open the SQL Server Properties (properties for the entire server) by right mouse clicking the server node in the tree. Select the Connection tab and set Query Timeout as desired. You can set the query timeout to 0 for indefinite or no timeout.
Part VII: Troubleshooting Applications
Application Runs But No Data is Displayed