2013-08-23 193 views
0

我使用MVC 4和WCF服务。将byte []数组参数传递给wcf服务

这里是我的viewmodel,我称之为服务。

The objSwatchClass has a property byte[] of an image. 
int updatedSeqNo = objSwatchService.InsertSwatch(objSwatchClass); 

绑定在我的应用程序的web.config

 <security mode="None"> 
     <transport clientCredentialType="None" proxyCredentialType="None" 
      realm="" /> 
     <message clientCredentialType="UserName" algorithmSuite="Default" /> 
     </security> 

</binding> 

Error when i call the service with byte as parameter Detailed Error

+0

objSwatchClass有一个属性SwatchImage,您可以在图像中看到。 SwatchImage = imgArray。它通过了。我想通过byte []传递整个对象作为它的一个属性。 – Sakthivel

回答

1

你没有公共区域释放你的完整绑定,但根据错误,你的客户端绑定似乎使用MTOM,而你的serevr绑定不(纯文本)。确保它们根据需要同步设置(MTOM更优化)。