Blog from Saravanan Arumugam

Let us talk about Technologies

ServiceReference.ClientConfig is not populated with Service Reference


Exception:

I came across a strange behavior of Visual Studio. When I made a Service reference in my Silverlight application, the visual studio created the classes and schemas; but not the config file (ServiceReference.ClientConfig)

 

Solution:

The reasons for having ServiceReference.ClientConfig not populated could be many. But in my case, I was using wsDualHttpBinding in the service (a duplex channeled service).

wsDualHttpBinding and may other bindings are not supported by Silverlight. To be precise Silverlight supports only BasicHttpBinding, pollingDuplexHttpBinding (supported with Silverlight 4) and customBinding.

When I made some changes in the service and changed the binding as basicHttpBinding, the Service Reference update populated the ServiceReference.ClientConfig file.

It could have been better if the service reference threw exception saying that the Silverlight supports only a subset of WCF bindings, instead of completing the reference successfully leaving the Config file incomplete. Hopefully the future releases of Visual studio would do that.

 

The following forum helped me narrow the issue.

Failed to generate the service reference WCF service

Advertisements

One response to “ServiceReference.ClientConfig is not populated with Service Reference

  1. Pingback: Unrecognized element ‘wsDualHttpBinding’ in service reference configuration. Note that only a subset of the Windows Communication Foundation configuration functionality is available in Silverlight. « Blog from Saravanan Arumugam

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: