Reading web.config [Resolved]
I'm trying to read the web.config file.
In web.config, I have:
Code:
<configuration>
<appSettings>
<add key="pluto" value="blue" />
</appSettings>
Simple?
I try to read it like this:
VB Code:
Dim strCustom As String
strCustom = System.Configuration.ConfigurationSettings.AppSettings("pluto").ToString
But when I run it, it doesn't even get to the vbcode. Instead, I get an error message just as it finishes compiling:
Quote:
---------------------------
Microsoft Development Environment
---------------------------
Error while trying to run project: Unable to start debugging on the web server. Server side-error occurred on sending debug HTTP request.
Make sure the server is operating correctly. Verify there are no syntax errors in web.config by doing a Debug.Start Without Debugging. You may also want to refer to the ASP.NET and ATL Server debugging topic in the online documentation.
---------------------------
OK Help
---------------------------
And if I start without debugging, it shows this:
Quote:
Parser Error Message: Unrecognized element
Source Error:
Line 5: <appSettings>
Line 6: <add key="pluto" value="blue" />
Line 7: </appSettings>
Line 8:
Line 9: -->
What's wrong with me? Should I jump out a window?