Unrecognized element 'appSettings'. in web.config file

Posted on 2010-01-04
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

    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

    LVL 5

    Expert Comment


    Author Closing Comment

    This answered my question partially

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
    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…
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

    733 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now