Im trying to use my web Config files in Silverlight.
I’ve put the following in web.config:
<configuration>
<appSettings>
<add key="FileHeader" value="file://***.com/Builds/"/>
<add key="WebHeader" value="http://***.com/dev/builds"/>
</appSettings>
Im trying to use them like
string temp= System.Configuration!System.Configuration.ConfigurationManager.AppSettings.Get("FileHeader");
However it does not work, it gives an error “Only assignment, calls, increment, decrement…can be used as a statement”
You can’t read web.config from your Silverlight application because the configuration namespace does not exist in the SL .NET Framework, but what you can do is this: