1
votes

I have a bit noobish question, so please forgive me, as I don't have much experience with asp.net.

I have created login control, which uses automatically generated ASPNET.MDF which is located in the App_Data folder.

Connection string looks like this: connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"

Now, I would like to place App_Data folder in db folder so database would be in db/App_Data/ASPNET.MDF. How do I change connection string to reflect this.

Thanks you for help

1

1 Answers

0
votes

Go into the IIS management of your production machine, and open the IIS, then:

  • Press on ConnectionStrings (it will give you a list of all of the connection strings in your site)

  • Alter the connection string of localserver to be similar to:

    (data source=.\SQLEXPRESS;Integrated Security=SSPI;DataSource=db/App_Data/ASPNET.MDF;User Instance=true)