I am building a windows phone 7.5 application and rather adding the WCF service reference by right clicking and executing the Add Service Reference, i want to generate the proxy in the code.
Can somebody help me in how I can achive this in code in WIndows Phone 7 project
Thanks
In WPF or other .Net applications you would use the ChannelFactory to generate a proxy class at run time. Unfortunately this is not properly supported on WP7 or Silverlight.
A possible workaround is this: System.UnsupportedException using WCF on Windows Phone 7
Alternatively you could use the ServiceStack client library to connect to the service. That may work, but it is not guaranteed. 🙂