增加Window Services中maxReceivedMessageSize的长度 [英] Increase the length of maxReceivedMessageSize in Window Services

查看:61
本文介绍了增加Window Services中maxReceivedMessageSize的长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<binding name="BasicHttpBinding_IPortalAPI" closetimeout="00:01:00" opentimeout="00:01:00" receivetimeout="00:10:00" sendtimeout="00:01:00" bypassproxyonlocal="false" hostnamecomparisonmode="StrongWildcard" maxbufferpoolsize="524288" maxreceivedmessagesize="2000000" messageencoding="Text" textencoding="utf-8" usedefaultwebproxy="true" allowcookies="false"><br />
          <readerquotas maxdepth="32" maxstringcontentlength="2000000" maxarraylength="16384" maxbytesperread="4096" maxnametablecharcount="16384" />





我在保存数据时将maxReceivedMessageSized = 2000000的大小增加到200000000



异常





I have increase the size of maxReceivedMessageSized =2000000 to 200000000

during saving the data it showingh exception

System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.<br />
The data for table-valued parameter "@WISR_DATA" doesn't conform to the table type of the parameter.<br />
The statement has been terminated.<br />
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)<br />
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)<br />
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()<br />
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)<br />
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)<br />
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)<br />
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)<br />
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)</binding>

推荐答案

我想这个错误不在服务层,而是在数据库层。检查变量@WISR_DATA的大小以及您尝试保存的表。其中一个可能具有小于数据大小的容量。希望这能让你知道在哪里看。
I guess this error is not at service layer but at database layer. Check the size of the variable @WISR_DATA and the table where you are trying to save. one of it might have the capacity less than the size of the data. Hope this gives you clue where to look at.


这篇关于增加Window Services中maxReceivedMessageSize的长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆