1
votes

I am taking over a project for someone who is no longer with the company, I am trying to add a WCF service that accepts and returns JSON to a project that already has a bunch of services that pass in data via the querystring and return JSON. On my local machine it works in visual studio, moving it to the server I get an error:

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: The binding at system.serviceModel/bindings/webHttpBinding does not have a configured binding named 'jsonpBinding'. This is an invalid value for bindingConfiguration.

Any idea what is causing this?

1
Post your web.config file, i.e. only <system.serviceModel> bit excluding anything not meant for public eyes. I imagine you don't have a binding with the name jsonpBinding in it. - Dr Schizo

1 Answers

3
votes

You're missing the binding configuration on Web.Config.

Something like this:

<bindings>
    <webHttpBinding>
        <binding name="jsonpBinding" crossDomainScriptAccessEnabled="true" />
    </webHttpBinding>
</bindings>

Put this inside the <system.serviceModel> tag.