appSettings causes HTTP Error 500.19 - Internal Server Error

  • Thread starter Thread starter Junior
  • Start date Start date
J

Junior

Vista SP1 IIS7

I'm trying to configure web.config following MSDN docs but keep getting
errors I don't know how to resolve..

<configuration>
<!--error-->
<appSettings file="AppSettings.config" />
<!--error-->
<appSettings configSource="AppSettings.config"/>
</configuration>

Any idea how to resolve?
 
Junior said:
Vista SP1 IIS7

I'm trying to configure web.config following MSDN docs but keep getting
errors I don't know how to resolve..

<configuration>
<!--error-->
<appSettings file="AppSettings.config" />
<!--error-->
<appSettings configSource="AppSettings.config"/>
</configuration>

Any idea how to resolve?

The contents of the Web.config is in valid that's what the 500.19 means. And
something that will run on IIS5 and XP may not apply to IIS7 and Vista.

I have found that whatever examples you're using, you must find the
equivalent example for IIS7 and Vista.
 
Mr. Arnold said:
The contents of the Web.config is in valid that's what the 500.19 means.
And something that will run on IIS5 and XP may not apply to IIS7 and
Vista.

I have found that whatever examples you're using, you must find the
equivalent example for IIS7 and Vista.

I was also getting the same error when trying the following:

<appSettings>
<add key="applicationName" value="MyApplication" />
</appSettings>

So what do I try next? I tried using the Website Administration Tool and
added a setting. Running the website does not generate an error anymore
which is why this stuff is madness and insanity.

But trying to access this property should return results but does not even
when loading the website in a new instance of a browser which reloads the
edited web.config file to expose its newly added properties.

applicationName = ConfigurationSettings.AppSettings("applicationName");
Page.Title = applicationName.ToString();
 
Need to use a Get method...

string appName;
appName = ConfigurationSettings.AppSettings.Get("MyApplicationName");
 
Back
Top