The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize paramete
-
Saturday, March 03, 2012 4:06 AMHi I am getting below Error . Im using OnPremise WCF + Azure Servie Bus + Silverlight client.
We are using WS2007HttpRelayBinding.
When my Sliverlight client is trying to fetch the huge data, i'm getting below error.
The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://it.es.sdsd.services/2011/06/v1.0:GetServiceIssueRisksResult. The InnerException message was 'There was an error deserializing the object of type System.Collections.ObjectModel.ObservableCollection`1[[XYZ.ES.sdsdvNext.SilverlightUX.sdsdCoreProxy.ServiceIssueRisk, XYZ.ES.vNext.SilverlightUX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]. Unexpected end of file while parsing Name has occurred. Line 1, position 16385.'. Please see InnerException for more details.
Inner Exception : System.Runtime.Serialization.SerializationException: There was an error deserializing the object of type System.Collections.ObjectModel.ObservableCollection`1[[XYZ.ES.xyzvNext.SilverlightUX.xyzCoreProxy.ServiceIssueRisk, XYZ.ES.xyzvNext.SilverlightUX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]. Unexpected end of file while parsing Name has occurred. Line 1, position 16385. ---> System.Xml.XmlException: Unexpected end of file while parsing Name has occurred. Line 1, position 16385.
All Replies
-
Sunday, March 04, 2012 1:56 PMModerator
Hello, Silverlight doesn't support WS2007HttpRelayBinding. It doesn't even support BasicHttpRelayBinding. However, you can use BasicHttpRelayBinding on the service side, and turn off ACS, so it will have the same behavior as BasicHttpBinding. On the client side, you can just use a BasicHttpBinding to access the service.
Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
If you have feedback about forum business, please contact msdnmg@microsoft.com. But please do not ask technical questions in the email. -
Tuesday, March 06, 2012 9:36 AM
Hi Thanks for your reply.
I have tried with basicHttpRelaybinding but i was getting the same error.
this error is not happening for every method, it is only coming for some methods in the service, where we were using entity frame work to get the data .
-
Wednesday, March 07, 2012 2:07 AMModeratorTry to use Fiddler to monitor the response. Does the response contain a correct xml representation of the entity?
Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
If you have feedback about forum business, please contact msdnmg@microsoft.com. But please do not ask technical questions in the email. -
Wednesday, March 07, 2012 7:31 AM
Hi ,
No the xml response is breaking after some point.on premaise i am getting the complete response without any issues.
But i f i use servciebus end point i am getting this error,
Onpremise we were using </binarymessageencoding> in the custome binding. but in any of the basicHttpRelaybinding,wsrelayBinding,webhttpRelayBinding ,the same was not supporting .
Is there anything we can do to get the complete xml message without getting deserialization error.
Thanks !
-
Wednesday, March 07, 2012 9:07 AMModeratorYes. Service Bus is incompatible with Silverlight's binary message encoding. You have to use text encoding.
Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
If you have feedback about forum business, please contact msdnmg@microsoft.com. But please do not ask technical questions in the email. -
Wednesday, March 07, 2012 1:30 PM
Hi thanks for your responses. so by default is using text encoding.
Can we do anything in service or client configurations to get the complete data with out de serialization error ?
or
do we need to change anything from code side ?
Please suggest me any solution about this issue?
Thanks !
-
Thursday, March 08, 2012 3:00 AMModeratorAre you using text encoding or binary encoding now? If you use text encoding, you should not have deserialization problem. If you use binary encoding, then you have to switch to text encoding.
Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
If you have feedback about forum business, please contact msdnmg@microsoft.com. But please do not ask technical questions in the email. -
Thursday, March 08, 2012 5:21 AM
Hi,
I am sure i am using text encoding only.
Thanks!

