[フレーム]

WCF Service does not have a Binding with the None MessageVersion

While building WCF REST service if you get below error message


Image 1 WCF REST service if you get below error message

Then make sure your WCF service Project’s web.config file should have below System.ServiceModel setting.

  1. <system.serviceModel>
  2. <behaviors>
  3. <serviceBehaviors>
  4. <behavior>
  5. <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
  6. <serviceMetadatahttpGetEnabled="true"httpsGetEnabled="true"/>
  7. <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
  8. <serviceDebugincludeExceptionDetailInFaults="false"/>
  9. </behavior>
  10. </serviceBehaviors>
  11. <endpointBehaviors>
  12. <behavior>
  13. <webHttphelpEnabled="True"/>
  14. </behavior>
  15. </endpointBehaviors>
  16. </behaviors>
  17. <protocolMapping>
  18. <addbinding="webHttpBinding"scheme="http"/>
  19. </protocolMapping>
  20. <serviceHostingEnvironmentaspNetCompatibilityEnabled="true"multipleSiteBindingsEnabled="true"/>
  21. <standardEndpoints>
  22. <webScriptEndpoint>
  23. <standardEndpointname=""crossDomainScriptAccessEnabled="true"/>
  24. </webScriptEndpoint>
  25. </standardEndpoints>
  26. </system.serviceModel>
Now run your WCF REST service


Image 2 Service 1
People also reading
Membership not found

AltStyle によって変換されたページ (->オリジナル) /