How to increase the Timeout session between Entity framework & Sql Server -



How to increase the Timeout session between Entity framework & Sql Server -

i working on entity framework within asp.net mvc 5. , sql server slow , whenever seek access page connected db receive next error:-

server error in '/' application. -------------------------------------------------------------------------------- wait operation timed out description: unhandled exception occurred during execution of current web request. please review stack trace more info error , originated in code. exception details: system.componentmodel.win32exception: wait operation timed out source error: unhandled exception generated during execution of current web request. info regarding origin , location of exception can identified using exception stack trace below. stack trace:

but can not find way increment timeout within entity framework class ? connection string within web.config looks follow:-

<add name="***entities" connectionstring="metadata=res://*/models.model2.csdl|res://*/models.model2.ssdl|res://*/models.model2.msl;provider=system.data.sqlclient;provider connection string=&quot;data source=*******;initial catalog=tmsres;integrated security=true;multipleactiveresultsets=true;app=entityframework&quot;" providername="system.data.entityclient" />

how increment timeout session between entity framework & sql server?

thnaks

you can set

// specify timeout queries in context, in seconds.<br> context.commandtimeout = 120;

http://msdn.microsoft.com/en-us/library/system.data.objects.objectcontext.commandtimeout(v=vs.110).aspx

note: please mark reply , vote if helpful :)

sql-server entity-framework

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -