I'm trying to run through this http://blogs.esri.com/esri/arcgis/2010/03/11/sending-geometry-between-silverlight-and-the-server-usi... and when I try and run the svc file in a browser I am getting the error that numerous other people have listed - "Could not load file or assembly 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified. "
I've added this reference to my project already and I still get this.
I'm not very good with Visual Studio so maybe I am adding things wrong. I have a sneaking suspicion that maybe it's the way I am adding the ESRI.ArcGIS.Client.dll since it doesn't error if I remove the ESRI data type.
The way I am adding the ESRI dll this by right clicking on the projects and browsing to C:\Program Files\ESRI SDKs\Silverlight4\v3.1\ESRI.ArcGIS.Client.dll. I have no idea what WPF build of the ESRI.ArcGIS.Client.dll assembly vs the the Silverlight build of the ESRI.ArcGIS.Client.dll assembly so I've just been adding this file to both the web and the Silverlight projects. I am assuming this is wrong?
This is the code of my svc file using System; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Activation; using ESRI.ArcGIS.Client.Geometry;
namespace SilverlightApplication1.Web { [ServiceContract(Namespace = "")] [SilverlightFaultBehavior] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class Service1 { [OperationContract] public MapPoint Shift(MapPoint point, double amount) { return new MapPoint(point.X + amount, point.Y + amount); }
// Add more operations here and mark them with [OperationContract] } }