Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > WCF won't transmit more than about 8K

Reply
Thread Tools

WCF won't transmit more than about 8K

 
 
Jim Sneeringer
Guest
Posts: n/a
 
      10-06-2009
I have a Silverlight 3 application that uses WCF to access a SQL Server
database. When a record field (a VARCHAR(MAX)) reaches about 8K, any WCF call
that causes that field to be transmitted fails with "The remote server
returned an error: NotFound" on the XxxCompleted callback. The server-size
code is never called at all.

If anyone knows how to fix this, I would love to know how. Otherwise, maybe
this post will help someone diagnose a similar problem.
 
Reply With Quote
 
 
 
 
Jim Sneeringer
Guest
Posts: n/a
 
      10-06-2009
Thank you.

I was not able to make it work by changing the config the way you said.
Maybe it will help if I post it here:

<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="sTickets.Web.TicketServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<!-- <dataContractSerializer maxItemsInObjectGraph="500000" />
http://forums.silverlight.net/forums/t/21797.aspx -->
</behavior>
</serviceBehaviors>
</behaviors>

<services>
<service behaviorConfiguration="sTickets.Web.TicketServiceB ehavior"
name="sTickets.Web.TicketService">
<endpoint address="" binding="basicHttpBinding"
contract="sTickets.Web.ITicketService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>

<bindings>
<basicHttpBinding>
<binding name="SilverlightBinding" closeTimeout="01:00:00"
openTimeout="01:00:00" maxBufferPoolSize="524288"
maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"
receiveTimeout="01:00:00" sendTimeout="01:00:00">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="None" />
</security>
<readerQuotas maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"
maxStringContentLength="2147483647" maxDepth="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
<!--<baseAddressPrefixFilters>
<add prefix="http://t.snee.us"/>
</baseAddressPrefixFilters>-->
</serviceHostingEnvironment>
</system.serviceModel>

Also, I found in the client project an autogenerated file
configuration91.svcinfo, which contained this:

<property path="/readerQuotas/maxStringContentLength"
isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32,
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>

I change the 0 to 2147483647, but it still fails.
 
Reply With Quote
 
 
 
 
Jim Sneeringer
Guest
Posts: n/a
 
      10-06-2009
{System.ServiceModel.CommunicationException: The remote server returned an
error: NotFound. ---> System.Net.WebException: The remote server returned an
error: NotFound. ---> System.Net.WebException: The remote server returned an
error: NotFound.
at
System.Net.Browser.BrowserHttpWebRequest.InternalE ndGetResponse(IAsyncResult
asyncResult)
at
System.Net.Browser.BrowserHttpWebRequest.<>c__Disp layClass5.<EndGetResponse>b__4(Object sendState)
at
System.Net.Browser.AsyncHelper.<>c__DisplayClass2. <BeginOnUI>b__0(Object
sendState)
--- End of inner exception stack trace ---
at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPos tCallback
beginMethod, Object state)
at System.Net.Browser.BrowserHttpWebRequest.EndGetRes ponse(IAsyncResult
asyncResult)
at
System.ServiceModel.Channels.HttpChannelFactory.Ht tpRequestChannel.HttpChannelAsyncRequest.CompleteG etResponse(IAsyncResult result)
--- End of inner exception stack trace ---
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at
System.ServiceModel.Channels.ServiceChannel.SendAs yncResult.End(SendAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCal l(String action,
Object[] outs, IAsyncResult result)
at System.ServiceModel.ClientBase`1.ChannelBase`1.End Invoke(String
methodName, Object[] args, IAsyncResult result)
at
sTickets.TicketServiceReference.TicketServiceClien t.TicketServiceClientChannel.EndTicket_Save(IAsync Result result)}

Here's where it died. The service code was never called.

public
System.Collections.ObjectModel.ObservableCollectio n<sTickets.TicketServiceReference.Ticket> EndTicket_Save(System.IAsyncResult result) {
object[] _args = new object[0];

System.Collections.ObjectModel.ObservableCollectio n<sTickets.TicketServiceReference.Ticket>
_result =
((System.Collections.ObjectModel.ObservableCollect ion<sTickets.TicketServiceReference.Ticket>)(base. EndInvoke("Ticket_Save", _args, result)));
return _result;
}

 
Reply With Quote
 
Jim Sneeringer
Guest
Posts: n/a
 
      10-07-2009

I'll check it out. Thank you so much for your help.

BTW, I'm pretty sure it's a size problem, because if I reduce the size of
the data, it starts to work.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Ajax Enabled WCF service and regular WCF? Cindy Lee ASP .Net 1 03-19-2010 05:59 PM
AJAX enabled WCF Service Vs Standard WCF Service Simon ASP .Net 0 10-13-2009 09:13 AM
Like all great travelers, I have seen more than I remember andremember more than I have seen. shenrilaa@gmail.com Java 0 03-06-2008 08:11 AM
Like all great travelers, I have seen more than I remember andremember more than I have seen. shenrilaa@gmail.com C++ 0 03-05-2008 08:41 AM
Like all great travelers, I have seen more than I remember andremember more than I have seen. shenrilaa@gmail.com C Programming 0 03-05-2008 03:26 AM



Advertisments