Der remote-server eine unerwartete Antwort zurückgegeben: (400) Bad Request

Bekomme ich keine Fehlermeldung beim aufrufen meiner WCF-service-Methoden, außer in einem.

Diese spezielle Methode namens SaveTemplate() nimmt eine Eingabe von byte[].

Ich Teste diese Methode, die eine Datei mit der Größe byte[806803],
aber endet in einer Fehlermeldung:

WCF - Der remote-server eine unerwartete Antwort zurückgegeben: (400) Bad Request.*

Ich gegangen durch verschiedene such-Ergebnisse habe ich über Google gefunden und machte einige änderungen in der app.config nach auf, aber immer noch den Fehler 🙁

Hier ist mein WCF Service Library App.Config-Datei:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>
    <compilation debug="true" />
  </system.web>

  <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="wsHttp" maxReceivedMessageSize="50000000" maxBufferPoolSize="50000000"
        messageEncoding="Mtom" >
          <readerQuotas maxDepth="500000000" maxStringContentLength="500000000" maxArrayLength="500000000"
          maxBytesPerRead="500000000" maxNameTableCharCount="500000000" />
          <security mode="None"></security>
        </binding>
      </wsHttpBinding>
    </bindings>

    <services>
      <service behaviorConfiguration="ReportingComponentLibrary.TemplateServiceBehavior"
        name="ReportingComponentLibrary.TemplateService">
        <endpoint address="" binding="wsHttpBinding" contract="ReportingComponentLibrary.ITemplateService" bindingConfiguration="wsHttp" >
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" ></endpoint>
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8080/ReportingComponentLibrary/TemplateService/" />
          </baseAddresses>
        </host>
      </service>

      <service behaviorConfiguration="ReportingComponentLibrary.TemplateServiceBehavior"
        name="ReportingComponentLibrary.TemplateReportService">
        <endpoint address="" binding="wsHttpBinding" contract="ReportingComponentLibrary.ITemplateReportService" bindingConfiguration="wsHttp" >
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8080/ReportingComponentLibrary/TemplateReportService/" />
          </baseAddresses>
        </host>
      </service>

    </services>

    <behaviors>
      <serviceBehaviors>
        <behavior name="ReportingComponentLibrary.TemplateServiceBehavior">
          <serviceMetadata httpGetEnabled="True"/>
          <serviceDebug includeExceptionDetailInFaults="True" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>
Können Sie bitte einen vollständigen stack-trace?

InformationsquelleAutor iniki | 2009-10-30

Schreibe einen Kommentar