1

I want to hide app.config. There are some things like webservice address that shouldn't be visible to user. Maybe it`s some way to put this config in resources?

Thanks

Mike Two
  • 44,935
  • 9
  • 80
  • 96
arek
  • 1,282
  • 4
  • 15
  • 25
  • 2
    Tip: Use the apostrophe found to the right of the semi-colon on your keyboard (if it's US). The other accent is used to denote in-line code formatting on Stackoverflow, like `code`. – Cecil Has a Name Sep 27 '09 at 10:33

3 Answers3

2

I think that encrypting app/web config would be a better option.

See this topic for more info Encrypting appSettings in web.config

Also codeproject has a plenty of articles.

Community
  • 1
  • 1
aku
  • 122,288
  • 32
  • 173
  • 203
1

Try to figure out whether the settings in your app.config file can be applied programmatically.

The most settings in the .NET framework can be used declarative and programmatically.

Michael Damatov
  • 15,253
  • 10
  • 46
  • 71
1

If you are really concerned about end-users snooping into the configuration details of your program, it will be very hard to hide such information (even if it's contained in code since it can be reverse compiled using tools like Reflector). You can only make it harder by applying some encryption scheme, like obfuscation that encrypts the internal string table of your assembly. Then again, it's easy to use a packet sniffer tool to obtain the remote URI your program is communicating with.

Cecil Has a Name
  • 4,962
  • 1
  • 29
  • 31