Hi,
We have WCF services that we host in IIS 7.5. One way we use to test
that the service is up and running is by using a browser and point it
to the .svc file. That used to show a web page that starts with:
"You have created a service.
To test this service, you will need to create a client and use it to
call the service. You can do this using the svcutil.exe tool from the
command line with the following syntax: [...]"
However, when a service gets or returns objects which have an Oid
somewhere in the object tree, we get an error page that starts with:
The service encountered an error.
An ExceptionDetail, likely created by
IncludeExceptionDetailInFaults=true, whose value is:
System.InvalidOperationException: An exception was thrown in a call to
a WSDL export extension:
System.ServiceModel.Description.DataContractSerializerOperationBehavior
contract:
http://tempuri.org/:IMyService ---->
System.MissingMethodException: No parameterless constructor defined
for this object.
Because of this (I think), it is not possible to use wcftestclient to
test the service, the "add service reference" in VS returns errors,
etc. Calling the service when the service and data contracts are
shared between the client and the service is no problems. The Oid
serializes just fine. It is just the WSDL extension that has problem
with it. I isolated the problem by elimination. When I got my service
down to data not having Oids, it worked just fine.
Anyone ever had this problem? Is there a workaround? The reason why it
causes me problems is that it gets pretty hard to debug a WCF issue
when you can't eliminate variables by using simple tools that requires
the metadata of the service.
Thanks,
gabriel