2011-07-21 10 views
1

私は私がWCF RESTサービス「ファイルの予期しない」末端

<bindings> 
    <basicHttpBinding> 
    <!-- Create a custom binding for our service to enable sending large amount of data --> 
    <binding name="NewBinding0" sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"> 
     <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> 
    </binding> 

    </basicHttpBinding> 

</bindings> 
を入れている500 reordsを挿入するためにWCF RESTサービスを使用しますが、エラー「ファイルの予想外の終わり」を取得していますASP.NET Webアプリケーションを持っています

クライアントのcofigとサービス設定の両方で同じ問題が存在する...

答えて

4

解決策はおそらくWCFとRESTに関するいくつかの記事を停止して検索し、使用する。

basicHttpBindingはSOAPサービス用であり、RESTサービス用ではありません。 RESTサービスは、そう、あなたの非常に最初の文

ので、私は

は、あなたの質問の残りの部分と直接衝突しているWCF RESTサービスを使用しています、アプリケーションで何が起こっているとは言い難いwebHttpBinding使用しています。

0

Mrnkaは正しいですが、RESTにはwebHttpBindingを使用する必要があります。 web.configファイルの内容は次のとおりです。

<system.serviceModel> 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> 
     <bindings> 
     <webHttpBinding> 
      <binding> 
      //binding here 
      </binding> 
     </webHttpBinding> 
     </bindings> 

    <standardEndpoints> 
     <webHttpEndpoint> 
      <!-- 
     Configure the WCF REST service base address and the default endpoint 
      --> 
    </system.serviceModel> 
関連する問題