-1

The wait operation timed out Error In Mvc. when i run my application in local server it work fine ....but after deploy of Project in Server i am getting this Error ... In my Local DataBase and Server database have same entry. plz tell me how to solve..

Local server: local server

Server ec2 aws: server ec2 aws

June7
  • 19,874
  • 8
  • 24
  • 34

1 Answers1

1

I found that adding a Timeout setting to the Command object worked.

      `myCmd.CommandTimeout = 1000`

You also should add a timeout setting for your connection string.

SqlConnection("Data Source=SQLSERVER;Initial Catalog=MYDATABASE;Integrated Security=True;Connection Timeout=1000")

See the other post here.

seanmcgriff
  • 65
  • 1
  • 7
  • 1
    Connection Timeout has nothing to do with the actual execution of the code. Command Timeout is what you're after. – Larry Smith Jun 01 '18 at 23:05