locked
Connection string not found RRS feed

  • Question

  • User791773689 posted

    Hello everybody, You know that in Visual Studio, when creating a DataSource, just after selecting the database, you are proposed to save its connection string with a name, to reuse it for other DataSources in the project. I always thought this name was saved in the connectionStrings section of the Web.config, as I used to write the same name in both contexts. I am less sure of that now. I registered the same connection string with two names in the Web.config. One is named ApplicationServices, and is the support for MySqlMembershipProvider. The other one is named VentesConnectionString, and is used for the DataSources on the asp.net pages.

    When changing, in source mode of a page, VentesConnectionString by ApplicationServices, I thought I should obtain the same result, but no, my page is in error, the user is routed to the error page. And it is right that only VentesConnectionString appears in the dropdownlist of the DataSource configuration dialog box. If I did that, it is because on the server, that error is obtained with either of both names. In the log, I see a 302 and a 304 errors, despite the Web.config has been deployed, with both names. The Membership service is OK, that means that the connection string correctly opens the same database with MySqlConnection and MySqlCommand objects.

    Well, where are the names used for the connection strings in the DataSources, saved ? Of course the real question after that, is how do I deploy that on the server ?

    Thursday, July 18, 2013 8:35 AM

All replies

  • User-801004448 posted

    Gluups

    Well, where are the names used for the connection strings in the DataSources, saved ?

    AFAIK they are saved in web.config file. Something else is wrong.

    Friday, July 19, 2013 1:30 AM