Unrecognized element 'appSettings'. in web.config file

Posted on 2010-01-04
Medium Priority
Last Modified: 2012-05-08
I have developed an application in .NET 2.0 WITH following code in the web.config.
    <add key="SiteURL" value="abcd"/>

I am reading this in my c# code as

string SiteURL= ConfigurationManager.AppSettings["SiteURL"];

It is working fine when I am testing in local(Not hosted in IIS)
wHEN i AM DEPLOYIN IT ON PRODUCTION it is not able to read appsetting of web.config file and giving following error
Unrecognized element 'appSettings'. in web.config file

Please help.
Question by:dhiraj79
LVL 13

Accepted Solution

zadeveloper earned 1500 total points
ID: 26170590
Check the web.config file in the servers root director, and check to see that the site is running in a application pool set to framework version 2
LVL 11

Expert Comment

ID: 26170612

Expert Comment

ID: 26178688

Author Closing Comment

ID: 31672346
This answered my question partially

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question