I was recently working on a project and needed to have Silverlight make a WCF call. That is pretty straight forward until you place the Silverlight code inside SharePoint and want it to call a WCF that is also inside SharePoint.
The first problem that I had to solve was getting Silverlight to be able to call the WCF correctly. Since in Visual Studio when you make the connection, it will have the local server for the path. Like http://localhost:95559/MyService.svc and for SharePoint I wanted it to point to the local server’s name and in the _layouts directory. Luckily I came across the following blog that helped with getting that to work: Silverlight ServiceR ...
Go to the complete details ...