tags:

views:

272

answers:

4

Hi, 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

A: 

To the user of the code? To the application user? This question is very generalized and not specific.

NickLarsen
to the application user
arek
+1  A: 

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
A: 

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
Yes, I know that there is always some way to get this kind of information but there is now need to give users opportunity to change some settings
arek
Then it shouldn't be in the configuration file.
Cecil Has a Name
+1  A: 

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.

aku