I'm calling.a rest service (the task service sample from the rest starter kit) using a channel factory by using this code:
WebChannelFactory factory = new WebChannelFactory(new WebHttpBinding(), new Uri(http://localhost:61825/Service.svc)); TasksService.IService proxy = factory.CreateChannel(); var i = proxy.GetTasks("Dimitri");
works fine, except for 2 problems. The service returns the correct data but i always get a pop show an error when i return from the server to the client:
"Unable to automaticly debug 'Task Service'. The remote procedure could not be debugged. This usually indicates that remote debugging has not enabeled on the server." Strange thing is that it's no problem to debug the service, i only get the message.
The next problem is that i'm not able to call a function on the service a second time. When i trie to do this i get the following exception:
"A property with the name 'UriTemplateMatchResults' already exists." This error is thorw in the SelectOperation method on the Microsoft.ServiceModel.Web.WrappedOperationSelector class.
Can anybody help me solving this problem? Thanks in advance!