I have the following problem: basically I have a WCF service that works fine in small tests. However, when I try to execute a test package / download, I get a message InvalidOperationExceptionwith a message when the open () method is called in the proxy class:
"The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be changed while it is in the Opened state."
I searched google but can't find anyone who is really quoting this exception message.
I suppose that for diagnostics additional information about the service may be required - when a service receives data through one of its public methods, it mainly performs some processing and routes the data to the data-related service (different data will lead to different routing). To ensure that the service runs as fast as possible, each cycle of receiving, processing and routing data is processed by a separate thread in the stream pool. could this be a problem arising from one thread causing proxyClass.Open()while another is already using it? if the block lockfixed this problem, if it really is a problem?
Thank you guys - Iβve already worked on this project for too long , and finally want to see it, but this seems to be the last stumbling block, so any help is greatly appreciated :-)
==================================================== ========================
thanks for not using the usingWCF proxy construct . However, the MSDN article is not the most clearly written literature, so one quick question is: should I use a proxy server as such:
try
{
client = new proxy.DataConnectorServiceClient();
client.Open();
client.Close();
}
..................
catch(Exception e)
{
client.Abort();
}
Nick
source
share