views:

25

answers:

1

I'm using the binding configuration below for my upload service,

<binding name="FileUploadSTSBinding">
          <security authenticationMode="UserNameOverTransport"
                    requireDerivedKeys="false"
                    keyEntropyMode="ServerEntropy"
                    requireSecurityContextCancellation="false"
                    requireSignatureConfirmation="false">
          </security>
          <mtomMessageEncoding/>
          <httpsTransport 
            transferMode="Streamed" 
            maxReceivedMessageSize="2147483647"/>
        </binding>

But with this setting, I'm not able to upload big files like more than 1mb, server response is bad request.

Any thoughts?

A: 

You need to set the maxRequestLength attribute as well for the upload to work. It can here found in the web.config file here:

<configuration>
   <system.web>
      <httpRuntime>

Check that the IIS app pool identity has the right to write to the temp folder to be able to temporarily store the incoming data.

Johann Blais
I've set the max value for maxRequestLength attribute, but still it's not working. Server returns a bad request, whenever I try to upload a large file.
JJK
How do you host the service?
Johann Blais
It's hosted on IIS with Windows 2003 server.I've verified the app pool identity has the right to store data. Any settings missing in the binding?
JJK