1

As it normally happens, I accidentally overwrote my web.config file this morning that has my WCF settings already working perfectly. As you would expect, no backup...shame shame shame on me.

That being said, I can't seem to get my configuration working again. Here is the error that I keep getting back from IIS/ASP.NET

The message with Action '' 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).

Here is an overview of what I have setup.

My Web Config:

<system.serviceModel>
  <bindings>
  <webHttpBinding>
  <binding name="Binding1" maxReceivedMessageSize="10000000">
  <readerQuotas maxArrayLength="10000000" />
  <security mode="Transport"></security>
  </binding>
  </webHttpBinding>
  </bindings>
  <behaviors>
  <serviceBehaviors>
  <behavior>
  <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
  <serviceDebug includeExceptionDetailInFaults="true" />
  </behavior>
  </serviceBehaviors>
  </behaviors>
  <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  <services>
  <service name="MyService">
  <endpoint address="" binding="webHttpBinding" bindingConfiguration="Binding1" contract="IMyService" />
  </service>
  </services>
  </system.serviceModel>

Here is the declaration in my Service Contract:

    [OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "/SSMX", BodyStyle = WebMessageBodyStyle.WrappedRequest, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
sqlStudio_Table_Permissions SSMX(string TableName);

Sadly I just can't seem to remember what I did in my previous configuration to make this work. Any help would be appreciated.

4

0 回答 0