views:

43

answers:

2

Hello.

I have a client apllication that run in very restricted area - it has no direct access to computer, where it is running. I don't want to invent another one System.Configuration system to configure my application.

But there is no method in ConfigurationManager, that allows to load configuration from string or Stream.

It seems to me that it's impossible to use a ConfigurationManager in this particular scenario, but may be (and I hope to) wrong?

+1  A: 

ConfigurationManager and WebConfigurationManager work exclusively with configuration files. This is because of the way the .NET configuration system is designed to cascade through folder hierarchies.

If you don't have access to the file system from your application, you wont be able to work with these classes.

Programming Hero
A: 

Maybe you can try by using IsolatedStorage to store a config file and load it when you need it. But it depends on the sandbox you have. Are you using web, silverlight, clickonce?

jmservera
I'm using Unity3D WebPlayer and they disable IsolatedStorage as well "for security reasons". Thank you for an idea.
Aen Sidhe