Thursday, May 26, 2016

System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

 

This error occured to me when i triyng to connect to a SQL database from SharePoint App which is use Entity Framework.

This is a timeout issue when app is trying to connect to a SQL database and connection was expired before execution.

I simply connected it adding a Coonection Timeout to the connection string.

<add name="dbtemponeEntities" connectionString="metadata=res://*/DataModels.dbtempone.csdl|res://*/DataModels.dbtempone.ssdl|res://*/DataModels.dbtempone.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=ASQL;initial catalog=dbtempone;persist security info=True;Connection Timeout=120;user id=SQLAdmin;password=*****$so;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

Post a Comment