web.config error

Last post 11-29-2009 9:52 PM by Thomas Sun – MSFT. 4 replies.

Sort Posts:

  • web.config error

    11-24-2009, 2:15 AM
    • Member
      point Member
    • paresh.engg
    • Member since 09-19-2009, 9:27 AM
    • Posts 5

    Hi All,

    I am getting following error when I try to access any web page uploaded on production server.

    I m using database caching in my application.


     

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: The entry 'cahceConnection' has already been added.

    Source Error:

    Line 46:  </appSettings>
    Line 47:  <connectionStrings>
    Line 48:   <add name="cahceConnection" connectionString="Data Source=Server1;Initial  Catalog=dbname;User ID=abc;Password=abc" providerName="System.Data.SqlClient"/>
    Line 49:  </connectionStrings>
    Line 50:  <system.web>

    Source File: C:\websites\production\SKJNew\web.config    Line: 48

     

    Thanks in advance for replying quick.
    Paresh Rathod


    Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

     

  • Re: web.config error

    11-24-2009, 2:40 AM
    Answer
    • All-Star
      23,597 point All-Star
    • qwe123kids
    • Member since 03-27-2008, 5:49 AM
    • Posts 4,028

    Hi,

    R U Using "cahceConnection" any where else..

    if yes then Rename connection string name  to something else..

    Thanks
    Avinash Tiwari

    Remember to click “Mark as Answer” on the post, if it helps you.

    MY Blog

    Hacking Inside .net exe
  • Re: web.config error

    11-24-2009, 2:43 AM
    Answer
    • Participant
      1,863 point Participant
    • imran_khan
    • Member since 03-11-2008, 11:57 AM
    • Ahmedabad
    • Posts 356

    paresh.engg:
    The entry 'cahceConnection' has already been added.

    check your webconfig file. there should be duplicate entery fo cahceConnection element so remove one

    Regard


    Imrankhan
    -----------------------------------------------------
    Always remember to mark as answer on the post that helped you.

    My Blog :
    http://aspnet-solutions.blogspot.com/
    http://javascriptsolution.blogspot.com/
  • Re: web.config error

    11-24-2009, 2:56 AM
    Answer
    • Participant
      782 point Participant
    • bloggernext
    • Member since 07-12-2009, 11:21 PM
    • Posts 168

    This could be because you are running the index service over your web
    application. try to stop indexing this application (from IIS management
    console, clear "Index this resource") or stop the index service to test if
    you still get error or not.

    also check your how you have set your site on IIS
    http://www.cryer.co.uk/brian/mswinswdev/ms_vbnet_server_error_in_application.htm

    Always bleeds red.The red team from Manchester will blow you away.
    United United United...
    Please Mark as Answer if it helps.
  • Re: web.config error

    11-29-2009, 9:52 PM
    Answer

    Hi,

    The error message means that there are 2 connection string named 'cahceConnection' in connectionStrings collection.

    You also can remove the old one from the collection and add this new one.

    For example:

      <connectionStrings>
       <remove name="cahceConnection" />
       <add name="cahceConnection" connectionString="Data Source=Server1;Initial  Catalog=dbname;User ID=abc;Password=abc" providerName="System.Data.SqlClient"/>
      </connectionStrings>


    I look forward to receiving your test results.

    Thomas Sun
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
Page 1 of 1 (5 items)