I see the following connection string in the default web.config:
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
I'm at the point when I want to change the connection string, but I cannot find where |DataDirectory| is set. I know it's pointing to a folder called App_Data
under the root of my role, where the file aspnetdb.mdf
is located.
Looking at this page: http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/dc31ea59-5718-49b6-9f1f-7039da425296/
it states that the SetData method is used to set the location; however I searched the entire solution and I cannot find a SetData call, or another reference to |DataDirectory|
. It also states that as a default it uses the application folder; however I know that is not true since the file is located under the App_Data
folder.
Any suggestions where it is set/where I should call the SetData method to set it? The first part is mroe helpful since it's a mystery to me atm :P
Thanks.