Ability to Get byte[] from WCF service

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
Posts: 25
Joined: Sun Dec 25, 2016 11:10 pm

Ability to Get byte[] from WCF service

Postby njs123 » Mon Jan 30, 2017 4:14 am


I have simple method which returns byte[].

When I add reference to the service in CSHTML project, the return type of the function changes to string

and when I call the service by running the CSHTML application I get following errors:

An exception of type 'System.ServiceModel.ActionNotSupportedException' occurred in mscorlib.dll but was not handled in user code

Additional information: The message with Action 'http://tempuri.org/IContract2/GetImage' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

Kind Regards

JS-Support @Userware
Site Admin
Posts: 1126
Joined: Tue Apr 08, 2014 3:42 pm

Re: Ability to Get byte[] from WCF service

Postby JS-Support @Userware » Mon Jan 30, 2017 6:51 am


This is supposed to work fine with the latest Beta 10.8 of CSHTML5.

Please find attached a sample client/server project that demonstrates the passing of a byte array to load an image downloaded from the WCF SOAP web service.

Please let me know if you also have the issue with the attached project, or if you find what's different in the attached sample project compared to your project.

(47.18 KiB) Downloaded 136 times

Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest