Inquiridor
400 bad request - wcf

Pergunta
-
Meu wcf funciona perfeitamente com arquivos com 5k, quando testo com arquivos de 50k cai neste erro.
Já visitei diversos fóruns parecidos, fiz inúmeras tentativas mas o erro persiste
Abaixo vou colocar meus configs para os amigos verem se encontram o erro:
app.config
<?xml version="1.0"?> <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IDocumentReceiverService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483646" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483646" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="2147483646" maxArrayLength="60000" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://192.168.1.25/WfaRedundanceDocumentReceiver/DocumentReceiverService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IDocumentReceiverService" contract="DocumentReceiverService.IDocumentReceiverService" name="BasicHttpBinding_IDocumentReceiverServiceName" /> </client> </system.serviceModel> </configuration>
web.config
<?xml version="1.0"?> <configuration> <system.serviceModel> <services> <service name="WfaRedundanceDocumentReceiver.DocumentReceiverService.svc"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IDocumentReceiverService" contract="DocumentReceiverService.IDocumentReceiverService"> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IDocumentReceiverService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483646" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483646" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="2147483646" maxArrayLength="60000" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646"/> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm=""/> <message clientCredentialType="UserName" algorithmSuite="Default"/> </security> </binding> </basicHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true"/> <!-- 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 --> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> <system.web> <compilation debug="true"/> </system.web> </configuration>
desde ja agradeço
"Precisamos fazer aquilo que pensamos não ser capazes de fazer!"
- Editado rschwalbe sexta-feira, 19 de julho de 2013 16:35
Todas as Respostas
-
Olá,
Olhando suas configurações na vi nada de anormal (pelo menos que eu entenda) e acho estranho que muitas sugestões da internet é justamente aumentar o tamanho suportado para recebimento neste serviço:
http://stackoverflow.com/questions/784606/large-wcf-web-service-request-failing-with-400-http-bad-request
http://talentedmonkeys.wordpress.com/2010/11/29/wcf-400-bad-request-while-streaming-large-files-through-iis/
http://stackoverflow.com/questions/5779394/uploading-large-xml-to-wcf-rest-service-400-bad-request
E se for alguma limitação do IIS ??
<system.web> <httpRuntime maxRequestLength="65536" /> </system.web>
Vitor Mendes | http://www.vitormendes.com.br/
"Ajuda teu semelhante a levantar a sua carga, porém, não a carregá-la." (Pitágoras)