本文介绍了如何将更多字节数组发送给wcf服务,例如20kb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过wcf将cole [](图像)发送到cosole应用程序,并且从控制台应用程序发送到wcf,只要byte [](图像)小于20KB,但一切正常,一切都会正常进行,当我尝试保存在控制台或表单应用程序中上传的图像并将其发送到wcf以将其保存在数据库中时,它不起作用

我收到:远程服务器返回错误:NotFound",并且调试器未到达wcf服务中的save方法.

如何将更多的字节数组发送给wcf服务,例如20kb.我必须在Web配置文件中进行哪些更改?

迫切需要..

我的配置文件如下:

我在配置文件中保留了如下标记


httpRuntime maxRequestLength ="2097151" useFullyQualifiedRedirectUrl ="true" executionTimeout ="14400"

绑定名称="TransferService" maxReceivedMessageSize ="2147483647" maxBufferSize ="2147483647" transferMode ="Buffered"

readerQuotas maxDepth ="2147483647" maxStringContentLength ="2147483647" maxArrayLength ="2147483647" maxBytesPerRead ="2147483647" maxNameTableCharCount ="2147483647"

requestLimits maxAllowedContentLength ="2000000000"

i am sending byte[] (image) through wcf to cosole app, and from console app to wcf, everything works well as long as the byte[] (image) is less than 20KB, but when it''s bigger, it doesn''t work when i try to save the image uploaded in console or form app and send it to wcf to save it in the DB

i receive: The remote server returned an error: NotFound" and debugger doesn''t reach the save method in the wcf service

how to send byte array more tha 20kb to wcf service..what are the changes i have to make in Web config file?

Urgently required..

My config file is as below:

I have kept tags as below in config file


httpRuntime maxRequestLength="2097151" useFullyQualifiedRedirectUrl="true" executionTimeout="14400"

binding name="TransferService" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Buffered"

readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"

requestLimits maxAllowedContentLength="2000000000"

推荐答案




这篇关于如何将更多字节数组发送给wcf服务,例如20kb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 17:13