简体   繁体   中英

WCF Service with IIS Compression maxStringContentLength Setting

I've got a Silverlight application that communicates via WCF Services. Our maxStringContentLength settings is set to 4MB. We've now got a scenario where a certain call does go over the 4MB limit and we rightly get an exception. After enabling IIS Dynamic content compression for our specific content type the packet size goes down to about 200KB (According to Fiddler). When doing the same service call we still get the exception that the packet size is over the 4MB limit.

Somehow this seems a bit strange. How does these limit size get applied when using IIS Dynamic content compression? Is the limit checked on the uncompressed data?

Thanks Riaan

The IIS compression determines the size when the content is transferred across the network.

WCF will serialize the message before IIS sendes it out. It is when the message is serialized and deserialized that the maxStringContentLength is checked.

Short answer is that the check is on the uncompressed data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM