I've got a simple WCF service that has worked fine while I've been testing on my dev machine.
Now I've moved the web service to a web server, and I'm running the service (in debug mode) at http://mydomain.com:8005. Opening a web browser to that URL shows the expected service page, and if I put a breakpoint on the server inside the interface I'm calling, it hits the breakpoint and returns the expected data... but on the client side it comes back with the following error:
An error occurred while receiving the HTTP response to http://mydomain.com:8005/. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
More clues: the interface signature is:
IEnumerable<MyClass> GetThings(out string errMsg);
where MyClass
is defined as Serializable, and the definitions are identical between client and server.
Any ideas what secret switches I need to flip?
WCF also needs to have concrete classes to pass data around (since it all needs to be XML-serializable and must be capable of being expressed in XML schema - interfaces aren't well suited).
I believe it won't be able to pass back an IEnumerable<T>
- try using a List<T>
(or an T[]
array) or a concrete type instead.
Any luck?