Click here to Skip to main content
15,895,829 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to change Sql Helper Default time in asp.net C#.


Showing Timeout Error in asp.net but Procedure run properly in Sql Server
Posted

1 solution

Probably, you can't - or at least not in a really useful way.
You may be able to change it by altering the CommandTimeout property of the SqlComamnd: https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.commandtimeout%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396[^]

But...if your command is timing out, then you probably need to look at your query and work on improving that rather than giving it more time. Extending the timeout may allow it to finish (if your hosting service doesn't have it's own overriding limits, and some do) but if your page is unresponsive for a long time waiting for your SQL to finish processing, the user is likely to assume you are dead and go elsewhere...
 
Share this answer
 
Comments
Rahulgupta.hanu 3-Oct-15 7:05am    
how to change sql helper timeout property..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900