Sunday, October 14, 2012

Set Sql Server Time Out in ASP.Net

How to Solve timeout expired problem:

simply Add in your web.config file inside ConnectionString;
<connectionStrings>
<add name="connect" connectionString="DataSource=MYPC;Initial Catalog=North;TimeOut=120"/>
</connectionStrings>
If u use a SqlCommand object in your code:
Then use

SqlCommand cmd=new SqlCommand();
cmd.TimeOut="180";

0 comments:

Post a Comment