Wcf服务无法返回大量数据 [英] Wcf service not able to return huge data
问题描述
你好,
我正在使用wcf服务来返回我的MVC应用程序中的数据合并。
如果数据的数量是< b,我的服务正常工作100.如果它超过100,那么它显示错误:500并且它没有返回到控制器。
在我的WCF中:
public List< string> GetName(id,dep)
{
List< string> name = new List< string>();
urlList = Obj.GetNameList(id,dep);
return urlList;
}
在我的控制器中:
this.ViewData [name] = service.GetName( id,dep);
如果urlList.count>它给出了ErrorCode:500,连接正在关闭,同时将数据从服务恢复到控制器。
任何建议Plz帮助!
hello,
I am using wcf service to return collactio of data in my MVC application.
My service is working fine if the count of data is < 100. if it incerease more than 100 then it is showing Error:500 and it is not returning to the controller.
In my WCF:
public List<string> GetName(id,dep)
{
List<string> name= new List<string>();
urlList = Obj.GetNameList(id, dep);
return urlList;
}
In my Controller:
this.ViewData["name"] = service.GetName(id, dep);
If urlList.count > 100 its giving ErrorCode:500 , The connection is getting closed while returing the data from service to controller.
Any suggestion Plz Help!
推荐答案
增加maxReceivedMessageSize
,maxBufferSize
和maxBufferPoolSize
配置文件中的属性,然后重试。
Increase themaxReceivedMessageSize
,maxBufferSize
andmaxBufferPoolSize
attributes in the configuration file and then try again.
这篇关于Wcf服务无法返回大量数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!