locked
SQLExpress to MSSQL RRS feed

  • Question

  • User1393905103 posted

    I have a page which was created by someone else and uses a CustomMembershipProvider.  I can see an aspnetdb.mdf file in the App_Data folder and it seems that this tool is connecting to the DB using SQLExpress.

    I would rather not install SQLExpress on this box since it is running SQL Server 2014.

    I don't see any references to SQLExpress in the web.config file but if I stop SQL express on the original machine (which has instances of both MSSQLSERVER and SQLEXPRESS) I get the same error.

    Any ideas on how I might find what is calling this or is there  a way to direct the tool to use MSSQL to access the file?

    Thanks,

    Mike

    Tuesday, October 4, 2016 3:36 AM

Answers

  • User-821857111 posted

    Should I attach this DB to SQL2014 and change the datasource or would that even work?
    It should work. It's certainly worth a try. However, I would be tempted to simply attach the file to SQL 2014 and then add a suitable connection string to the web.config file so that it accompanies the application, rather than being set at IIS level.

    https://www.connectionstrings.com/store-connection-string-in-webconfig/

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 4, 2016 1:13 PM

All replies

  • User-821857111 posted

    There will be a connection string somewhere. I would expect to find it in the web.confg file, but it could be hardcoded anywhere in your application. Do a search for SQLEXPRESS.

    Tuesday, October 4, 2016 6:42 AM
  • User1393905103 posted

    I appreciate the help.

    I'll look through the files again but can't really even see anything that would be accessing this mdf file.

    Thanks,

    Mike

    Tuesday, October 4, 2016 12:39 PM
  • User1393905103 posted

    Nothing in the web.config file but in connection strings in IIS I see this:

    LocalSqlServer   datasource=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true    Inherited

    Should I attach this DB to SQL2014 and change the datasource or would that even work?

    Tuesday, October 4, 2016 12:46 PM
  • User-821857111 posted

    Should I attach this DB to SQL2014 and change the datasource or would that even work?
    It should work. It's certainly worth a try. However, I would be tempted to simply attach the file to SQL 2014 and then add a suitable connection string to the web.config file so that it accompanies the application, rather than being set at IIS level.

    https://www.connectionstrings.com/store-connection-string-in-webconfig/

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 4, 2016 1:13 PM