简体   繁体   中英

PollingDuplexHttpBinding Endpoint NotFound - Content Mismatch

I've created a WCF Hosted service that runs in a console to be accessed by silverlight. My PolicyHost works great, my service loads up fine. I can go to my silverlight client and do an "Add Service Reference" and have VS2010 download my service reference with the appropriate wsdl and generate a proxy.

However, when I go to call the first method I get back the following message each time.

The remote server returned an error: NotFound.

Digging into this a little more via the Wcf TraceLog Viewer I see the following;

Content Type application/mspd1 was sent to a service expecting application/soap+msbin1. The client and service bindings may be mismatched. Cannot process the message because the content type 'application/mspd1' was not the expected type 'application/soap+msbin1'

Now, if I drop the callbacks, drop the DuplexPolling and put it back to WsHttpBinding - my method calls seem to work fine.

Is there something I am missing in trying to configure Duplex Polling to work correctly?

Greg

May be covered but I'll ask anyways. Are you using the client assembly for duplex polling? It needs to be included in your references. And you need to use the server assembly on your wcf service. When you get the sdk, both assemblies are included. Also make sure you are using the correct version.

If you've got all that, how did you have visual studio generate your proxy? Did you include contracts option? Or are you using a shared assembly that can be compiled with full framework CLR or silverlight CLR.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM