|
-
Jul 19th, 2004, 12:34 AM
#1
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:
---------------------------
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:
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?
Last edited by mendhak; Jul 19th, 2004 at 12:51 AM.
-
Jul 19th, 2004, 12:51 AM
#2
Don't you just hate it when you solve the problem yourself?
-
Jul 19th, 2004, 03:20 AM
#3
Fanatic Member
I do if the person doesn't post the answer.
-
Jul 19th, 2004, 04:26 AM
#4
Line Number 9, in the quoted error.
I had a --> for absolutely no reason there.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|