Proplem when Adding WCF Service to Silverlight 3 Project

Answered Proplem when Adding WCF Service to Silverlight 3 Project

  • Thursday, July 16, 2009 8:57 AM
     
     

    When i add  WCF Service References to my Silverlight 3 Project

    i got that two WARNING

    Warning 1 : Custom tool warning: Endpoint 'WSHttpBinding_IVotingService' at address 'http://localhost:1613/VotingService.svc' is not compatible with Silverlight 3. Skipping... D:\Sculpture 2.0\Trail\DataPagertry\DataPagertry\Service References\VotingServiceReference\Reference.svcmap 1 1 DataPagertry

    Warning 2 : Custom tool warning: No endpoints compatible with Silverlight 3 were found. The generated client class will not be usable unless endpoint information is provided via the constructor.

    Can anyone help.

All Replies

  • Thursday, July 16, 2009 9:17 AM
     
     Answered

     there are a few bindings supported by silverlight, but i believe wshttpbinding is still not one of them.  basichttpbinding will work.

  • Thursday, July 16, 2009 9:54 AM
     
     

     Silverlight 3 supports basicHttpBinding and for that You need to modify either web.Config file and set binding to basicHttpBinding or use Silverlight Enabled WCF service.

  • Thursday, July 16, 2009 10:08 AM
     
     

     I found CustomBinding in Web.Config file for my service.

  • Thursday, July 16, 2009 10:09 AM
     
     
  • Thursday, July 16, 2009 10:12 AM
     
     

    As varshavmane said, either follow her link or paste your web.config code here so we can help you troubleshoot.

  • Friday, July 17, 2009 8:37 AM
     
     

    Thanks for replys...

    Is this because of I am using SL 3 beta?

  • Friday, July 17, 2009 9:52 AM
     
     

    I dont think so.

    Yesterday only I have migrated my SL 2 project to SL 3. I have to delete all the Referneces and add them again and it work perfectly fine for me.

  • Friday, July 24, 2009 9:44 AM
     
     

    thanks ccoombs i try to use basicHttpBinding and it work fine

  • Friday, July 24, 2009 9:46 AM
     
     

    Please can you tell me what do you mean about use Silverlight Enabled WCF service.

  • Friday, July 24, 2009 10:08 AM
     
     

    You can create a WCF service and then manually change the binding in the service's configuration file. But the easiest way to get started creating WCF services is to use the Silverlight-enabled WCF Service template in the Add New Item dialog of Visual Studio 2008. By using this template, all of the necessary configuration options will automatically be created to allow for a basicHttpBinding.

    More here:

    http://reddevnews.com/articles/2009/05/20/creating-a-silverlight-enabled-wcf-service.aspx

  • Friday, November 13, 2009 2:23 AM
     
     

    Hi Ahmed,

    Please add a silverlight enabled WCF service to your existing WCF application (lets say the service file name is mySilverService.svc).

    Now add this service reference to your silverlight project. (url should be : http://<servername>/<WCF app name>/mySilverService.svc).

    Now we are all set to use our WCF from silverlight.

     

     

    -Happy silverlighting. Smile

  • Thursday, December 31, 2009 10:23 AM
     
     

     please any body has any idea about calling hosted wcf service on server from silverlight.

  • Thursday, December 31, 2009 2:37 PM
     
     
  • Monday, January 25, 2010 5:53 AM
     
     

    but with basicHttpBinding manner,i want to use userme client credential,but fail.

     

    msn:jorden008@hotmail.com

     

  • Thursday, October 13, 2011 5:24 AM
     
     

    The following solved my problem, I created a new WP7 project added the wcf service copied the Service References folder to the directory of my project that gave me this problem. Then I restarted my Visual studio and built the application. you should get namespace errors inside your Reference.cs just change the namespace to yourproject namespace and it should work