0

I try to call a web service who is under a RP.

In local, it works :

enter image description here

But when it is déployed, i got this :

enter image description here

Here is a capture with Fiddler :

enter image description here

Here is my web.config :

    <?xml version="1.0" encoding="utf-8"?>
<configuration>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <standardEndpoints>
      <webScriptEndpoint>
        <standardEndpoint crossDomainScriptAccessEnabled="true"/>
      </webScriptEndpoint>
    </standardEndpoints>
    <services>
      <service name="PDAErsteinService.PDAErsteinMobileService" behaviorConfiguration="ServiceBehavior">
        <endpoint address="" binding="webHttpBinding" behaviorConfiguration="web"
                  contract="PDAErsteinService.IPDAErsteinMobileService"/>
      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
          <readerQuotas maxStringContentLength="2147483647"/>
        </binding>
      </webHttpBinding>
      <basicHttpBinding>
        <binding name="CopySoap" closeTimeout="00:01:00" openTimeout="00:01:00"
          receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
          bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferPoolSize="524288" maxBufferSize="655360" maxReceivedMessageSize="655360"
          textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"
          messageEncoding="Text">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Ntlm" proxyCredentialType="Ntlm"
              realm="" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://XXXXXXXXXXXXXXXXXXXXXXXXXX.fr/_vti_bin/copy.asmx"
        binding="basicHttpBinding" bindingConfiguration="CopySoap"
        contract="SP.CopySoap" name="CopySoap" />
    </client>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="web">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>

I dont know what is wrong with my service. How can a request and return a 400 ? Thx

Xavier W.
  • 1,270
  • 3
  • 21
  • 47
  • A Status Code 400 is a bad request. There is something most likely wrong with your request, not with anything on the REST service. Basically there was something wrong either in the configuration or the syntax of your request. – Justin Russo Jul 01 '14 at 13:05
  • How is it possible to get more informations about the structure of my request ? – Xavier W. Jul 01 '14 at 13:07
  • Well, is the request simply being made from the address bar of the browser? If so, are you using HTTP or HTTPS protocol properly? Otherwise, the only way I could think there would be a bad request would be if you were entering the wrong URL or if you were using Javascript and there was something wrong with your header information. – Justin Russo Jul 01 '14 at 13:37
  • Yes it's made from the address bar of the browser to try. I use HTTPS correctly and dont use JS or JQUERY. The URL is correct, i got a 404 otherside. – Xavier W. Jul 01 '14 at 13:40
  • 404 is a "Not Found" error. This means there is something wrong with your URL. What is the main URL you are trying to reach? Is it only available in your domain, or the WWW? – Justin Russo Jul 01 '14 at 13:43
  • I said i dont get a 404. The URL is correct and available WWW – Xavier W. Jul 01 '14 at 14:25
  • You actually said, "i got a 404 otherside", but okay. Have you dowloaded Telerik Fiddler? You can watch your request and sometimes get more information about your error. – Justin Russo Jul 01 '14 at 14:31
  • I just used Telerik Fiddler and update my post, do we need more informations ? – Xavier W. Jul 02 '14 at 08:41
  • Looks like a WCF service and not a web service.Your binding is most likely the culprit. Can you paste the binding config from your wcf service? – Justin Russo Jul 02 '14 at 13:43
  • Post updated with web.config – Xavier W. Jul 02 '14 at 14:21

0 Answers0