Reputation: 3796
I have a Windows Service hosted WCF Web Service. I've been generating proxies using SVCUTIL and things have been working fine, but today I changed the InstanceContextMode from InstanceContextMode.Single to InstanceContextMode.PerSession and now I get the below error which I can't isolate. I can reliably recreate the error by changing nothing other then this one setting. Any ideas???
Here is the Error Message from SVCUTIL
Generating metadata files... EXEC : error : There was an error exporting the service type: Host.Services.MyService.
An exception was thrown in a call to a WSDL export extension:
System.ServiceModel.Description.DataContractSerializerOperationBehavior contract: http://MySoftware/ServiceContracts/2011/02:IMyService
The service interface is as follows:
[ServiceContract(Namespace = Namespace.Current, SessionMode = SessionMode.Allowed)]
public interface IMyService
The service implementation is now configured as follows:
[ServiceBehavior(Namespace = Namespace.Current, InstanceContextMode = InstanceContextMode.PerSession)]
public class MyService : IMyService
Here is the current setting in my config file for the data contract serializer
<dataContractSerializer maxItemsInObjectGraph="1000000" />
Upvotes: 0
Views: 254
Reputation: 1438
This doesn't seem to be related to the instance context mode.
Try the following:
Upvotes: 2