Cannot pass System.Text.Encoding as item value of Hashtable in WCF
am 21.10.2007 12:22:23 von zlfHello,
I have a WCF method,
public IDictionary GetDocumentMetadata(long docId)
{
IDictionary ht = new Hashtable();
ht["Encoding"] = Encoding.ASCII;
return ht;
}
I will get CommunicationException when calling it from client. WCF does not
allow to pass Encoding entity as dictionary item value? Thanks
TestCase 'TopCoder.Util.FileManagementService.DemoTests.Demo'
failed: System.ServiceModel.CommunicationException : An error occurred while
receiving the HTTP response to http://localhost:5506/WCFService. 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.
----> System.Net.WebException : The underlying connection was closed: An
unexpected error occurred on a receive.