Adding a database file to the app_data folder only works with SQL Server Express editions. There is nothing you can do to enable it for Enterprise versions.
If you have SQL Server Enterprise, you need to create your database and your db objects on this server (using SQL Server Mgmt Studio or Visual Studio) and connect to this server. You cannot put MDF / LDF files in app_data with the Enterprise version - it just won't work.
Or, if you do not like this approach, you can always install SQL Server 2005/2008 Express on your computer, and then use "put your MDF file in app_data " with this version of Express.
source share