How do I implement log throttling in WCF?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Andrew FensterRank #983 · 2K reputationPosted May 2, 2011, 12:06 PM EDT
maxMessagesToLog
maxSizeOfMessagesToLog
The main point of these settings is to prevent a denial of service attack on your web service. Someone could try to overload your logger with millions of messages or with very large messages.
There's a downside, however. Once you exceed the maxMessagesToLog, your service keeps processing incoming calls, but it stops logging them. So you're guarding against one type of attack but making yourself vulnerable to another type.
See http://wcfsecurity.codeplex.com/wikipage?title=How%20do%20I%20implement%20log%20throttling%20in%20WCF?
Note: Message throttling only matters when you're using WCF Message Logging. For more on message logging, see http://msdn.microsoft.com/en-us/library/ms730064.aspx