WCF RIA - Don't be fooled around with the error message

Posted at: 3/11/2010 at 6:44 PM by saravana

I've structured my visual studio solution so that the WCF RIA domain services live in a separate project (assembly) from the actual web project. Today I was greeted with the following exception (via Fiddler) when trying to access an operation in the domain service.

System.ServiceModel.CommunicationException: Unrecognized message version.
   at System.ServiceModel.Channels.ReceivedMessage.ReadStartEnvelope(XmlDictionaryReader reader)
   at System.ServiceModel.Channels.BufferedMessage..ctor(IBufferedMessageData messageData, RecycledMessageState recycledMessageState, Boolean[] understoodHeaders)
   at System.ServiceModel.Channels.BinaryMessageEncoderFactory.BinaryMessageEncoder.ReadMessage(ArraySegment 1 buffer, BufferManager bufferManager, String contentType)
   at System.ServiceModel.Channels.MessageEncoder.ReadMessage(ArraySegment`1 buffer, BufferManager bufferManager)
   at BinaryMessageFiddlerExtension.BinaryInspector.GetWcfBinaryMessageAsText(Byte[] encodedMessage)
   at BinaryMessageFiddlerExtension.BinaryInspector.UpdateView(Byte[] bytes)

I couldn't find any resources explaining the solution to this issue, but looks like few people encountered it. In my scenario, the error was caused because the client could not reach the service, and it was returning 404 (thanks to Fiddler), but the exception details on the client side were completely misleading.

The solution to my issue is just to add a project reference to my external assembly which contains all of my WCF RIA services.

Nandri!

Saravana

Tags: |  Categories: Silverlight
Actions: Email this article Email | Kick it! | DZone it! | Save to del.icio.us | Technorati Links
Post Information: Permanent LinkPermalink | CommentsComments(0) | Comments RSS

Comments

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading