tags:

views:

55

answers:

1

I am trying to consume one of my WCF services using a net.tcp binding and I am receiving the following error:

"The .Net Framing mode being used is not supported by 'net.tcp://myWCFService:8050/MyService'."

The research I have done states this is caused by having an improper "transfermode" in the binding configuration, but in my service I do have it set as follows:

transferMode="Streamed"

I actually have tried all (4) transfermode options on the WCF service to no avail. This is a newly consumed service using the "Add Service Reference" tool within VS.NET 2010, so there is nothing on the client I can manipulate or alter configuration other than providing the URL to consume.

I also tried changing the port it was hosted on as this error can be produced by something using the same port, but that didnlt help either.

Anyone have any ideas on this? Thanks!

A: 

Nevermind -> this error was masking another error and sending me down the wrong path. This WCF service is hosted in a Windows Service and the service would start just fine. However upon consuming the error above was presented.

To investigate further, I decided to run the WCF service locally from VS.NET using the "WCF Test Client" tool, and upon strating I was provided the real error. I had code that was inheriting from a class that was not a DataContract. The (2) soltuions were either to mark the parent class as a DataContract or to not inherit from that parent class anymore.

In my case the inheritance was not needed and was something grandfathered from early development. Once I removed the inheritance, redeployed, started the service, and reconsumed - everything went perfectly.

So if you ever receive this error, try launching it 1st in VS.NET using the WCF Test Client tool to work out any issues. If you still reveive the same error I did only upon consuming the service once deployed, look back to my original post because the things I tried to remedy the error initially might help you as well.

Nothing like making a post to put the pressure on to answer my own question! ;-)

atconway