Skip to main content

MSDN

Answered Question Silverlight 2 WCF returns NOT FOUND message when posting large dataRSS Feed

(0)

bugBurger
bugBurger

Member

Member

3 points

8 Posts

Silverlight 2 WCF returns NOT FOUND message when posting large data

Here is the scenario. I am using SL2 to post large data to WCF. The service works well until it reach to 65536 limit. After that wcf service return NOT FOUND message. I have search through lot of forums and verified my config files for both client and server are correct. No luck. 

Does any one can quicky create a scenario and see whther it works ? Any help will be appriciated.

Sergey.Lutay
Sergey....

Star

Star

12286 points

2,165 Posts

Re: Silverlight 2 WCF returns NOT FOUND message when posting large data

Hi,

You can send data by portion for 65536.

(If I answered your question, please click on "mark as answer".)

Blog

Twitter


Sincerely,
Serhii Lutai

MCT, MCPD, MIC Trainer

xiaoyongaz
xiaoyongaz

Member

Member

24 points

7 Posts

Re: Silverlight 2 WCF returns NOT FOUND message when posting large data

Can you post your config?

You can also enable tracing on server side and see what kind of exception do you get. It normally is some kind of quota been reached

Joezhou

bugBurger
bugBurger

Member

Member

3 points

8 Posts

Answered Question

Re: Silverlight 2 WCF returns NOT FOUND message when posting large data

I finally solve my problem - I had bindingconfiguration tag missing in my config. Here is perfectly working config files -

Web.Config in your Web Project: 

<system.serviceModel>
  <bindings>
   <basicHttpBinding>
    <binding name="LargeBuffer" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
     <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
      maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    </binding>

   </basicHttpBinding>
  </bindings>
   <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
   <services>
   <service behaviorConfiguration="MyNameSpace.UploadBehavior"
    name="Aprimo.Web.WCF.Upload">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeBuffer"  contract="MyNameSpace.Upload" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
   </service>
  </services>
        <behaviors>
   <serviceBehaviors>   
    <behavior name="MyNameSpace.UploadBehavior">
     <serviceMetadata httpGetEnabled="true" />
     <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
   </serviceBehaviors>
  </behaviors>
</system.serviceModel>

ServiceReferece.ClientConfig under Silverlight Project: 

 <configuration>
    <system.serviceModel>              
        <bindings>                        
            <basicHttpBinding>                            
                <binding name="LargeBuffer_Upload" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
                    <security mode="None" />
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>        
            <endpoint address="http://localhost:1475/WCF/Upload.svc" binding="basicHttpBinding"
                bindingConfiguration="LargeBuffer_Upload" contract="Aprimo.Silverlight.UploadService.Upload"
                name="LargeBuffer_Upload" />
        </client>
    </system.serviceModel>
</configuration>

varshavmane
varshav...

Star

Star

12461 points

2,587 Posts

Re: Silverlight 2 WCF returns NOT FOUND message when posting large data

Hi,

Check this:

http://www.eggheadcafe.com/community/aspnet/18/10084621/timeout-in-calling-wcf-se.aspx

Also you can check this post: http://silverlight.net/forums/t/22736.aspx

HTH Smile

Please "Mark as Answer" if this post answered your question. :)
Visit my Blog

varshavmane
varshav...

Star

Star

12461 points

2,587 Posts

Re: Silverlight 2 WCF returns NOT FOUND message when posting large data

Hi,

Add this is your web config file:

<runtime>

<basicHttpBinding>

<!-- buffer: 64KB; max size: 64MB -->

<binding name="FileTransferServicesBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transferMode="Streamed" messageEncoding="Mtom" maxBufferSize="65536" maxReceivedMessageSize="67108864">

<security mode="None">

<transport clientCredentialType="None" />

</security>

</binding>

</basicHttpBinding>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<dependentAssembly>

<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />

<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />

</dependentAssembly>

<dependentAssembly>

<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />

<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />

</dependentAssembly>

</assemblyBinding>

</runtime>

HTH Smile

Please "Mark as Answer" if this post answered your question. :)
Visit my Blog

billsm
billsm

Contributor

Contributor

3580 points

1,011 Posts

Re: Silverlight 2 WCF returns NOT FOUND message when posting large data

I just wanted to thank everyone who contributed this post Thanks

kaurav_sonika
kaurav_...

Member

Member

4 points

2 Posts

Re: Re: Silverlight 2 WCF returns NOT FOUND message when posting large data

This thread will help you...

http://smehrozalam.wordpress.com/2009/01/29/retrieving-huge-amount-of-data-from-wcf-service-in-silverlight-application/

  • Unanswered Question
  • Answered Question
  • Announcement