My application keeps running into Timeout Expired SqlExceptions. The thing is that this query is one that will simply have to run for a decent amount of time. I'm having trouble figuring out where this exception is occurring though. Is this a timeout that's created at the database server or is it happening in my program? Or if it could be both, how do I figure out which one it is?
And lastly, how do I extend the timeout period?
It is likely that you are running over the CommandTimeout set on your DataContext. This defaults to 30 seconds.
All you need to do is set the property on the DataContext before you execute your query.