Let's take the scenario of a WCF client and a WSE service using MTOM either with or without security, here's some of the settings that help make this possible. I'm going to focus mostly on code, but almost all or all of these are available via config.