locked
The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty. RRS feed

  • Question

  • User2001227443 posted

    Hello everyone

    I have question about the 'LocalSqlServer' connection string.

    I have web.config file with conectionstring, membership, rolemanager and profile section.

    Everything is ok and there is no any error. but i got the "The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty." error, when i add clear and remove 'LocalSqlServer':

      <connectionStrings>
        <clear/>
        <remove name="LocalSqlServer"/>
        <add name="MyDBConnectionString" ...

    I am curious to know why i need 'LocalSqlServer' instead of my MyDBConnectionString?

    Or

    Why error disappeat when i remove the "clear" and "remove" from connection string section?

    Thanks in advance.

    Thursday, April 3, 2014 5:28 PM

Answers

  • User753101303 posted

    Hi,

    More likely you still have something configured to use the LocalSqlServer connection string. Search in web.config and machine.config files for LocalSqlServer...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 3, 2014 5:41 PM