MarimerLLC / cslaforum

Discussion forum for CSLA .NET
https://cslanet.com
Other
31 stars 6 forks source link

CSLA.NET and WCF Large Object Transfer Questions #178

Open MarkOverstreet opened 8 years ago

MarkOverstreet commented 8 years ago

We are in the process of writing an imaging app utilizing CSLA.NET and ran into a problem saving data that seems to be related to the size. So I have these questions for those of you that have more experience with CSLA.NET than myself:

Here is the design. We have a ScannedDocument object with a property for all the document images. Pretty simple so it looks something like this...

ScannedDocument doc = await ScannedDocument.NewScannedDocumentAsync();

ScannedDocumentImage newImage = doc.Images.AddNew() ... ... doc.Save();

1) I have the books and I have set all the max sizes as the book indicates. maxReceivedMessageSize="2147483647" readerQuotas maxBytesPerRead="2147483647" maxArrayLength="2147483647" maxStringContentLength="2147483647" maxNameTableCharCount="2147483647" maxDepth="2147483647"

  However, I get this error... 
  "There was no endpoint listening at WcfPortal.svc that could accept the message"

  when I save a document with images totaling over 20MB.  The code works fine on documents with
  a smaller number and size of images:  

  So my question is how can I determine the total size of the serialized ScannedDocument object 
  in order to verify it isn't larger than the Max settings?

2) How have others handled dealing with large data transfers? I am currently using basicHttpBinding.

3) What is typically done in CSLA.NET if indeed I did need to move over 2GB of data which seems to the max settings?

Thanks for any assistance.

Mark

jonnybee commented 8 years ago

What is the IIS version your app is running in?

Could it be this that is causing pain? http://m.devproconnections.com/development/beware-iis-75s-max-content-length-setting

MarkOverstreet commented 8 years ago

Wow, I tried that and it worked! Just for someone else's reference here is what I added to the web.config of the remote data portal hosted in IIS7.5...

` <!-- The maxRequestLength indicates the maximum file upload size supported by ASP.NET, the maxAllowedContentLength specifies the maximum length of content in a request supported by IIS. You need to set both maxRequestLength and maxAllowedContentLength values to upload large files.

system.webServer> security> requestFiltering> requestLimits maxAllowedContentLength="2147483647" /> /requestFiltering> /security> /system.webServer>

-->`

MarkOverstreet commented 8 years ago

Thanks again!