1
Vote

Bug in the BeginOpen async method of the ExceptionHandlingProxyBase class

description

The plug-in generates an ExceptionHandlingProxyBase class to be used by the service reference code. The following code in that class calls the wrong method of the ICommunicationObject interface; it should invoke BeginOpen not BeginClose:
 
public IAsyncResult BeginOpen(TimeSpan timeout, AsyncCallback callback, object state)
{
        lock (this.m_channelLock)
        {
            if (this.IsDisposed) throw new InvalidOperationException("Cannot use disposed object.");
            return ((ICommunicationObject)m_channel).BeginClose(timeout, callback, state);
        }
}
 
The workaround is to edit the class to invoke the correct method but the plug-in should be updated since this code is embedded as a resource string in the DLL.

comments