tags:

views:

73

answers:

3

I need to upload large (100 meg max) binairies to server using WCF. I followed instructions from this: http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/fileuploadsilverlightwcf07142009104020AM/fileuploadsilverlightwcf.aspx

it workds for anything less than 50K. going above that I get 415 errors. any idea?

+1  A: 

is there a max POST size limit on your server?

chillitom
I have the max on the binding set to a big number: <basicHttpBinding> <binding name="MyWindowsAuthenticationBinding" maxReceivedMessageSize="2000000" maxBufferSize="2000000"> <readerQuotas maxArrayLength="2000000" maxStringContentLength="2000000"/> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Windows" /> </security> </binding> </basicHttpBinding>is it the same thing or there is some other max I have to set as well?
Ali Shafai
I'm not sure about IIS but when I've trun web services on Tomcat I've hit problems because the server has a maximum amount that can be submitted in an HTTP POST request. Might be worth checking IIS's settings to see if there is a similar setting there.Googling for IIS max post size, seems to turn up a bunch of stuff.
chillitom
+1  A: 

You may want to try setting maxReceivedMessageSize and maxBufferSize to int.MAX and upping the value of maxItemsInObjectGraph.

http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/c85f3ed2-0b55-4375-af79-5926b6cc527c

Corey Sunwold
+2  A: 

Try this on your binding configuration:

<binding name="MyWindowsAuthenticationBinding" closeTimeout="05:00:00" openTimeout="05:00:00" receiveTimeout="05:00:00" sendTimeout="05:00:00" maxBufferSize="2000000000" maxBufferPoolSize="2000000000" maxReceivedMessageSize="2000000000" messageEncoding="Mtom" transferMode="Streamed">
      <readerQuotas maxDepth="2000000000" maxStringContentLength="2000000000" maxArrayLength="2000000000" maxBytesPerRead="2000000000" maxNameTableCharCount="2000000000" />
Jojo Sardez