WCF RIA – Don’t be fooled around with the error message

|  Posted: March 11, 2010  |  Categories: General Technical
You can download the entire article as a PDF document.
WCF RIA – Don’t be fooled around with the error message

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

You can download the entire article as a PDF document.
WCF RIA – Don’t be fooled around with the error message
Author: Saravana Kumar

Saravana Kumar is the Founder and CTO of BizTalk360, an enterprise software that acts as an all-in-one solution for better administration, operation, support and monitoring of Microsoft BizTalk Server environments.

  • onixpam

    Thanks just was looking for

One Platform Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

ServiceBus360

Azure Composite Application

Learn more

Start manage and monitor your Azure Services in minutes

One Platform - Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

One Platform - Operations, Monitoring and Analytics Software
ServiceBus360

Azure Composite Application

Learn more

Start manage and monitor your Azure Services in minutes

Back to Top