none
404 when File is bigger then 20MB RRS feed

  • Question

  • 

    Hi All I have a Problem with the IIS. I try to send a File via a Service and when the File
    is < 20MB it works but when the File is > 20MB I get an
    System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at
    IDocumentService.svc that could accept the message. This is often caused by an
    incorrect address or SOAP action. See InnerException, if present, for more details.
    ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
    I already add <httpRuntime maxRequestLength="102400" executionTimeout="3600"/>

    and

    <security> <requestFiltering> <!-- maxAllowedContentLength is in bytes --> <requestLimits maxAllowedContentLength="100000000"/> <!-- 100MB --> </requestFiltering> </security> to the web.config. So normally I would expect that the IIS allow me to send a
    File that is max 100MB. IIS is Version 6.1 and die Server is 2008R2 Any Ideas? Thx for help Michael


    

    MK

    Wednesday, May 7, 2014 7:35 PM

Answers

All replies

  • Hi,

    In wcf service if you want to send large data, then you will need to do some configuration in the config file as following:

    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IServices" closeTimeout="00:20:00"
            openTimeout="00:20:00" receiveTimeout="00:20:00" sendTimeout="00:20:00"
            maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
            messageEncoding="Text" textEncoding="utf-8" transferMode="Streamed">
          <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647"
              maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding>
      </basicHttpBinding>
    </bindings>

    Also please do not forget to apply the above config file to the endpoint:
     <endpoint address=""
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IServices"
                contract="YourServiceContract"/>
    

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, May 8, 2014 6:07 AM
    Moderator
  • Hi Amy,
    thank you for the reply. I already have done this configuration and I don't think that this is a Problem whit the WCF Configuration. This i a Problem with the IIS Configuration. I get the 404 before my Service is even called. The Service already works in another Installation. But I can't find out where the differences are in ISS

    Regards Michael


    MK

    Thursday, May 8, 2014 7:13 AM
  • Does any one have an Idea on this?

    THX for Help


    MK

    Tuesday, May 13, 2014 6:50 AM
  • Hi,

    IIS6 uses a new metabase property called UploadReadAheadSize when passing data. So the fix to it is simply to up the size of the UploadReadAheadSize metabase property.

    For more information, please try to refer to the following articles:
    #Can't upload large files using IIS6:
    http://blogs.msdn.com/b/jiruss/archive/2007/04/13/http-413-request-entity-too-large-can-t-upload-large-files-using-iis6.aspx .

    #UploadReadAheadSize Metabase Property:
    http://technet.microsoft.com/en-us/library/cc728324(v=WS.10).aspx .

    Best Regards,
    Amy Peng

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, May 15, 2014 5:04 AM
    Moderator