This is a migrated thread and some comments may be shown as answers.

How to add ApplicationSettings to web.config

3 Answers 202 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
danparker276
Top achievements
Rank 2
danparker276 asked on 08 Apr 2011, 12:17 AM
I'm calling from a webpage and I have some variables in my settings that are not connection strings (just strings).  I can add the connection strings to the web.config ok, but the application settings don't seem to work. 
Here is what's in the report app.config or myReport.dll.conifg
<applicationSettings>
    <MyReport.Properties.Settings>
        <setting name="MyVariable" serializeAs="String">
            <value>Test123</value>
        </setting>
    </MyReport.Properties.Settings>
</applicationSettings>

My guess was to use:

<appSettings>
    <add key="MyReport.Properties.Settings.MyVariable" value="Test123"/>
      </appSettings>

Does the MyReport.dll.config do anything if you put it in the bin of your website/ webservice?

3 Answers, 1 is accepted

Sort by
0
Massimiliano Bassili
Top achievements
Rank 1
answered on 11 Apr 2011, 03:37 PM
I'm not sure I get your question and its relevance to the Reporting product. I assume MyReport.dll is the compiled class library where your reports reside i.e. standard class library with standard .NET classes in it (that is what Telerik Reports are, after all).
You can find more information on applications settings in MSDN respective articles: Managing Application Settings.

Cheers!
0
danparker276
Top achievements
Rank 2
answered on 11 Apr 2011, 05:07 PM
I can't add Application Settings for a website though.  My connection string works fine when I set it in the web.config, then the .dll uses it.  There is appSettings but not applicationSettings
0
Accepted
Massimiliano Bassili
Top achievements
Rank 1
answered on 12 Apr 2011, 08:30 AM
Those should be helpful: Cheers!
Tags
General Discussions
Asked by
danparker276
Top achievements
Rank 2
Answers by
Massimiliano Bassili
Top achievements
Rank 1
danparker276
Top achievements
Rank 2
Share this question
or