I would like to turn on compression in my SOAP WCF requests. The solution described here works perfectly. It involves 2 parts:
The implementation of a IWebRequestCreate inherited class which turns on compression. This is not a problem.
Specifying in the app.config file that the above mentioned class should be used. This is done with this XML in the app.config file:
:
<configuration>
<system.net>
<webRequestModules>
<remove prefix="http:"/>
<add prefix="http:"
type="Pajocomo.Net.CompressibleHttpRequestCreator, Pajocomo" />
</webRequestModules>
</system.net>
</configuration>
However, this is a problem, as this C# project is a DLL (an SSIS data flow component), and it cannot 'see' the app.config file (nor do we want to modify the calling .exe's config file).
The question here describes a workaround for this problem (in short, creating BasicHttpBinding and EndpointAddress objects and sending them to the client's c'tor). I have successfully used this to some extent to allow for proxy's, alter timeouts, change the service's URL, etc.
However, I cannot figure out the mechanism to replace the above XML in a similar manner.