Forum Moderators: open
I've got a site running on my PC that writes to a database. The connection string uses the absolute path to the DB (C:\websites\blah\database.mdb) which is fine running on my localserver.
I'm trying to deploy this to my host, so I change the path to the correct path, rebuilt the project - copy the files required to run the project to a new folder and ftp it all to the host.
For some reason the app throws an error telling me the the path is not valid, which is isn't as it's still looking for the C:\websites\blah\database.mdb path.
Why is this? I presumed that if I rebuilt the project it would compile the new path and it would all be good. Any suggestions appreciated :)
<appSettings>
<add key="connectionstring" value="c:\whatever\db1.mdb"/>
</appSettings>
Then you'll access it with something like this:
Dim connStr As String
connStr = ConfigurationSettings.AppSettings("connectionstring")
and away you go...