Tuesday, March 27, 2012

copying website: database doesnt work?

Since VWD Express doesn't support Publish Website, I used 'Copy Website' to deploy my local site to the hosting server. The static page works fine, but when it gets to accessing database, I kept getting the following error:

An attempt to attach an auto-named database for file I:\Data\Web\dnh.sk\lingling_15726c71-b2bf-479f-bcc3-b7ae43318f3c\www\App_Data\Personal.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Anyone has the same experience? How to resolve this?

Thanks,

When you deploy your project, you have to upload your database separately.

You cannot use the db from the app_data folder. Execute the SQL against the db that you have in your hosting server and change the connectionstring for that.

Regards

|||

smiling4ever wrote:

When you deploy your project, you have to upload your database separately.

You cannot use the db from the app_data folder. Execute the SQL against the db that you have in your hosting server and change the connectionstring for that.

How do you do this when you only have VS.2005 and the basic SQL Express tools? Is it possible?

No comments:

Post a Comment