I have a stored procedure that I know might take some time to execute.
When I run it from SQL Server Management Studio, it takes about 12-15 minutes to complete and that is fine.
But when I run it from my C# asp.net web application it crashes after 40 minutes and it still doesn't complete.
What it the difference between the two runs and how can I fix it to run from my application?