Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Location on Server & VWD

Status
Not open for further replies.

Melagan

MIS
Nov 24, 2004
443
US
Greetings,

I once read that it was wisest to store your database in a folder outside of your web application. For example: might point to "D:\Melagan\melagan.com" on my web server, so I should probably store my database in a folder that is outside of "D:\Melagan\melagan.com" - perhaps "D:\Melagan\data".

The obvious reason for this, to me, is security. Great idea, but here is the issue:

I create an offline development copy of the web app using Visual Web Developer (VWD). VWD likes to have databases in the App_Data folder within your web app. This seems to contradict the above suggestion.

If I ignore VWD's suggestion and store the db in an outside folder, I seem to loose a large part of VWD's functionality. Also, when I go to copy the site to my remote web server, the issues are obvious - the directory structure on my web host are not the same as my offline dev. copy, so I end up having to manually upload the DB and change connection strings in my app, etc. (even if I store connection strings in web.config, it is a pain to have to change it every time when I upload).

I'm sure there are some simple ways around these issues, but I'm also wanting to look at the big picture. Is seperating the data from the application *that* critical?

~Melagan
______
"It's never too late to become what you might have been.
 
The App_Data folder is best utilised if you are testing and don't have access to a full version of SQL Server (as you can store an Express edition in it or even an access databse if you're feeling lucky!). Ideally, you won't be using either of these in a production environment and so it doesn't really matter as you can just change your connection string in your web.config file to point at the production server prior to release.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Ahh yes - that makes sense. Thank you for the feedback as always!


~Melagan
______
"It's never too late to become what you might have been.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top