appSettings causes HTTP Error 500.19 - Internal Server Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Junior

    appSettings causes HTTP Error 500.19 - Internal Server Error

    Vista SP1 IIS7

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

    <configuratio n>
    <!--error-->
    <appSettings file="AppSettin gs.config" />
    <!--error-->
    <appSettings configSource="A ppSettings.conf ig"/>
    </configuration>

    Any idea how to resolve?

  • Mr. Arnold

    #2
    Re: appSettings causes HTTP Error 500.19 - Internal Server Error


    "Junior" <somebody@somew here.comwrote in message
    news:%2340%23bH T5IHA.4268@TK2M SFTNGP02.phx.gb l...
    Vista SP1 IIS7
    >
    I'm trying to configure web.config following MSDN docs but keep getting
    errors I don't know how to resolve..
    >
    <configuratio n>
    <!--error-->
    <appSettings file="AppSettin gs.config" />
    <!--error-->
    <appSettings configSource="A ppSettings.conf ig"/>
    </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.

    Comment

    • Junior

      #3
      Re: appSettings causes HTTP Error 500.19 - Internal Server Error


      "Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
      news:ugT9BbT5IH A.2348@TK2MSFTN GP06.phx.gbl...
      >
      "Junior" <somebody@somew here.comwrote in message
      news:%2340%23bH T5IHA.4268@TK2M SFTNGP02.phx.gb l...
      >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="AppSettin gs.config" />
      ><!--error-->
      ><appSettings configSource="A ppSettings.conf ig"/>
      ></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.
      I was also getting the same error when trying the following:

      <appSettings>
      <add key="applicatio nName" value="MyApplic ation" />
      </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 = ConfigurationSe ttings.AppSetti ngs("applicatio nName");
      Page.Title = applicationName .ToString();

      Comment

      • Junior

        #4
        Re: appSettings causes HTTP Error 500.19 - Internal Server Error

        Need to use a Get method...

        string appName;
        appName = ConfigurationSe ttings.AppSetti ngs.Get("MyAppl icationName");


        "Junior" <somebody@somew here.comwrote in message
        news:OSJ4ltT5IH A.4908@TK2MSFTN GP04.phx.gbl...
        >
        "Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
        news:ugT9BbT5IH A.2348@TK2MSFTN GP06.phx.gbl...
        >>
        >"Junior" <somebody@somew here.comwrote in message
        >news:%2340%23b HT5IHA.4268@TK2 MSFTNGP02.phx.g bl...
        >>Vista SP1 IIS7
        >>>
        >>I'm trying to configure web.config following MSDN docs but keep getting
        >>errors I don't know how to resolve..
        >>>
        >><configuratio n>
        >><!--error-->
        >><appSetting s file="AppSettin gs.config" />
        >><!--error-->
        >><appSetting s configSource="A ppSettings.conf ig"/>
        >></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.
        >
        I was also getting the same error when trying the following:
        >
        <appSettings>
        <add key="applicatio nName" value="MyApplic ation" />
        </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 = ConfigurationSe ttings.AppSetti ngs("applicatio nName");
        Page.Title = applicationName .ToString();

        Comment

        Working...