I have a desktop application which contains an App.config (program.exe.config at release) with clearly visible elements which define my WCF endpoints and WCF implementation.
I would ideally like to hide this from the users eyes, from simple hacking, view and change.
Should I: -
- Programmatically create and store my WCF endpoints and binding configuration in code. or;
- Implement some protection scheme over the App.config (if so, what, how), effectively obfuscating/encrypting these elements from public view, but understandable from my code?
I already utilise .NET Reactor to obfuscate and protect my program from reflection techniques.
Update 13-May-09 3:32 GMT+10
Alright well I managed to encrypt system.serviceModel but then it proved unusable when the app went to launch as an exception was thrown (System.TypeInitializationException: The type initializer for 'System.ServiceModel.DiagnosticUtility' threw an exception.)
<system.serviceModel>
<!-- [bindings] -->
<bindings configProtectionProvider="DPAPIProtection">
<EncryptedData>
<CipherData>
<CipherValue>AQAAANCMnd8BFdERjHoAwE/Cl+...
So there goes that idea. I'll either ditch this idea, or set my endpoints in code which is behind encryption.
Isn't anybody else concerned about their endpoint addresses clearly visible in config???
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…