【问题标题】:The operation has timed out--Exception in a WCF Service RSS操作已超时--WCF 服务 RSS 中的异常
【发布时间】:2011-11-28 15:00:52
【问题描述】:

您好,我创建了一个 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 中没有端点 r 绑定。

我应该在哪里更改 TimeOut 值?

【问题讨论】:

    标签: asp.net wcf


    【解决方案1】:

    更改托管 WCF 端点的服务器上的超时时间:

    Explaination of different timeout types

    【讨论】:

      猜你喜欢
      • 2013-04-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多