I had the same problem, my solution in VB:
Dim db As New Database ' ... Some Work with EF without procedures (90 seconds) db.SaveChanges() For Each p In list If db.Database.Connection.State <> ConnectionState.Open Then ' This is only executed 1 time db.Database.Connection.Open() End If ' ... Some Work with EF but calling a mapped procedure (1 or 2 seconds each call) db.MyProcedure(p.FieldId) Next db.Dispose()
But the total time was 200 seconds, so I had to change this in my WebConfig my WebService :
<system.web> <httpRuntime executionTimeout="600" /> ...
source share