none
The message with Action 'POST' cannot be processed at the receiver RRS feed

  • Question

  • Hi,

    I have had too migrate an existing .asmx webservice accross to WCF.
    I am using basichttprelaybinding and basichttpbinding.

    As I have the source for the existing service, creating an interface from the old service
    was very simple.

    The problem I am having is that all of the operationcontracts work except the functions
    tha require no arguments.

    The old service was being consumed by many clients, such as ios, java, .net etc etc

    All the other operationcontracts work just fine.

    The following is an example of the code

     [OperationContract(Action = "http://tempuri.org/GetDelimiter")]
            string GetDelimiter();
    
            [OperationContract(Action = "http://tempuri.org/GenerateDeviceUniqueCode")]
            string GenerateDeviceUniqueCode(string DBToken, string UserName, string Password, string sMACAddress);

    From the above, only the second one works. And all functions that do not require arguments give me this error

    The message with Action 'POST' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

    with StackTrace

    System.ServiceModel.Dispatcher.ErrorBehavior.ThrowAndCatch(Exception e, Message message)
    System.ServiceModel.Dispatcher.ChannelHandler.ReplyFailure(RequestContext request, Message fault, String action, String reason, FaultCode code)
    System.ServiceModel.Dispatcher.ChannelHandler.ReplyContractFilterDidNotMatch(RequestContext request)
    System.ServiceModel.Dispatcher.ChannelHandler.EnsureChannelAndEndpoint(RequestContext request)
    System.ServiceModel.Dispatcher.ChannelHandler.TryRetrievingInstanceContext(RequestContext request)
    System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
    System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
    System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)
    System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
    Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously)
    Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
    Microsoft.ServiceBus.Common.InputQueue`1.AsyncQueueReader.Set(Item inputItem)
    Microsoft.ServiceBus.Common.InputQueue`1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread)
    Microsoft.ServiceBus.Common.InputQueue`1.EnqueueAndDispatch(T item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
    Microsoft.ServiceBus.Channels.InputQueueChannel`1.EnqueueAndDispatch(TDisposable item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
    Microsoft.ServiceBus.Channels.SingletonChannelAcceptor`3.Enqueue(QueueItemType item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
    Microsoft.ServiceBus.SocketConnectionReplyChannelListener.Microsoft.ServiceBus.Channels.ISingletonChannelListener.ReceiveRequest(RequestContext requestContext, Action callback, Boolean canDispatchOnThisThread)
    Microsoft.ServiceBus.Channels.ConnectionDemuxer.OnSingletonPreambleKnown(ServerSingletonPreambleConnectionReader serverSingletonPreambleReader)
    Microsoft.ServiceBus.Channels.ServerSingletonPreambleConnectionReader.ReadAndDispatch()
    Microsoft.ServiceBus.Channels.ServerSingletonPreambleConnectionReader.StartReading(OnViaDelegate viaDelegate, TimeSpan timeout)
    Microsoft.ServiceBus.Channels.ConnectionDemuxer.OnSingletonConnection(IConnection connection, Action connectionDequeuedCallback, Int64 streamPosition, Int32 offset, Int32 size, TimeSpan timeout)
    Microsoft.ServiceBus.Channels.ConnectionDemuxer.OnConnectionModeKnownCore(ConnectionModeReader modeReader, Boolean isCached)
    Microsoft.ServiceBus.Channels.ConnectionDemuxer.OnConnectionModeKnown(ConnectionModeReader modeReader)
    Microsoft.ServiceBus.Channels.ConnectionModeReader.Complete()
    Microsoft.ServiceBus.Channels.ConnectionModeReader.Complete(Exception e)
    Microsoft.ServiceBus.Channels.ConnectionModeReader.ReadCallback(Object state)
    Microsoft.ServiceBus.Channels.StreamConnection.OnRead(IAsyncResult result)
    System.Net.LazyAsyncResult.Complete(IntPtr userToken)
    System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
    System.Net.Security._SslStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
    System.Net.Security._SslStream.ReadFrameCallback(AsyncProtocolRequest asyncRequest)
    System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
    System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
    System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
    Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously)
    Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
    Microsoft.ServiceBus.Channels.ConnectionStream.ReadAsyncResult.OnAsyncReadComplete(Object state)
    Microsoft.ServiceBus.Channels.SocketConnection.FinishRead()
    Microsoft.ServiceBus.Channels.SocketConnection.AsyncReadCallback(Boolean haveResult, Int32 error, Int32 bytesRead)
    Microsoft.ServiceBus.Channels.OverlappedContext.CompleteCallback(UInt32 error, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
    Microsoft.ServiceBus.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
    System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

    I am sure I have tried most of the fixes  could find out there, but none worked for me. The service when consumed from a .net console application works perfectly with all the operations. It is only from others like IOS that this error occurrs.

    We need it to be 100% backward compatable with the old .amx service.

    Any help will be greatly appreciated

    Regards

    Louis
    Wednesday, March 13, 2013 8:46 AM

Answers

All replies