c# console app timeout?

P

phil2phil

Hi,
We have a c# console app that hits a db stroed proc to get data, it
keeps timing out. we tried increasing the timeout value in the
connection string, but that's not helping. it runs for about 30 sec
then times out. the stroed proc is taking about 45sec to return, but
it does return data when we call in directly in sql query analyzer. Is
there anyway to increase the amount of time we can get the app running,
rather than having it timeout like that?

I saw this:
http://msdn2.microsoft.com/en-us/library/system.enterpriseservices.transactionattribute.timeout.aspx

But when i tried the line:
TransactionAttribute attribute =
(TransactionAttribute)Attribute.GetCustomAttribute(this.GetType(),typeof(TransactionAttribute),false);

in my static void Main(string[] args) method, it errors out on the word
'this' as it's not static.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top