操作已超时——WCF服务RSS中的异常



你好,我已经创建了一个WCF服务,它有一个方法

public List<AppharborDbModel.MMTS_Stations> GetStations()
{
    db = new AppharborDbModel.AppHarborDBEntities();
    var x = from n in db.MMTS_Stations select n;
    return x.ToList<AppharborDbModel.MMTS_Stations>();
}

当我从客户端应用程序中消费它时,我得到以下异常…

TimeOutException
The request channel timed out while waiting for a reply after 00:00:58.8880000.        Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.
The operation has timed out
Description: An unhandled exception occurred during the execution of the current web   request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.Net.WebException: The operation has timed out
Source Error: 

Line 601:        
Line 602:        public  System.Collections.Generic.List<ServiceWebReference.MMTS_Stations> GetStations() {
Line 603:            return base.Channel.GetStations();
Line 604:        }
Line 605:    }

我在。net 4.0中使用"WCF服务"web模板,它具有隐式端点和绑定。因此,在web.config中没有端点或绑定。

我应该在哪里更改TimeOut值?

更改WCF端点所在服务器上的超时时间:

不同超时类型的说明

最新更新