SQL Server Timeout Expired in ASP.NET C# WebForms application I have the following issue on my database which is used by a c# ASP.NET application:


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


I've tried sp_who and sp_who2 to check the cmd's visible there, which shows there is an average connectioncount of 10 users with AWAITING COMMAND and one CHECKPOINT.

The only way I can fix this database for several days is to take the application offline and take the database offline. Afterwards I can put the database back online and it will function without problems for a few days.

This is not a solid solution because the problem keeps coming back. But I'm out of thoughts what I can try.

What are the next steps for me to find the cause of this issue?
Sounds like a poor performing query that is crossing over the default 30 second timeout for .net connections.  SQL Server will process a query for as long as it takes, but the application is deciding to stop the show after 30 seconds.  

You should fire up SQL Profiler and capture long running transactions (ones that have duration > 1 second) and transactions that require more than a few thousand reads.

Once you have a few of these queries isolated, you can begin to examine them for poor performance (look at indexes, joins, etc.)