WCF DataPortal large message error: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at WcfPortal.svc that could accept the message

WCF DataPortal large message error: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at WcfPortal.svc that could accept the message

Old forum URL: forums.lhotka.net/forums/t/11687.aspx


shawndewet posted on Thursday, November 08, 2012

I have a use case in my ASP.MVC app in which I need to save a collection of about 15k records (this is from a CSV file upload).  I'm putting it through CSLA business objects in order validate the uploaded data with business rules.

I'm making use of the WCF DataPortal. When save is called I get this error after about 30s to 45s:

System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at [my dataportal IIS host address]\WcfPortal.svc that could accept the message.

I have determined that if I break down the collection into smaller chunks, and call save on each of those chunks, the use case completes without a problem.

I have configured my Service to use the max values as follows (recommended in Rocky's book) (and increased the sendTimeout based on other guidance):

 

<binding name="wsHttpBinding_IWcfPortal" maxReceivedMessageSize="2147483647" sendTimeout="05:00:00">

    <readerQuotas maxBytesPerRead="2147483647" maxArrayLength="2147483647"         maxStringContentLength="2147483647" maxNameTableCharCount="2147483647" maxDepth="2147483647"/>

</binding>

Now I KNOW for a fact that my data does not exceed the 2147486347 size limit.  Besides, if it did, I would expect to get a more meaningful error message indicating this (like I did when the size limits were at their defaults).

I have turned on WCF logging/tracing, which reveals nothing.  This error seems to be some communication level error that gets hit before WCF stack comes into the picture.

 

Please advise as to why I would be getting this error when trying to save this large collection?

 

 

RockfordLhotka replied on Tuesday, November 13, 2012

Your data, when converted into XML, might exceed the max size limits of WCF?

Or perhaps you are hitting a limitation of the serializer (NDCS). In fact this seems more likely given that your WCF trace isn't showing anything. It seems reasonable to think that the NDCS is failing to serialize the data before the WCF transport plumbing is being invoked.

You may have no real choice but to chunk the data.

Copyright (c) Marimer LLC