Any solution for error message "Could not attach file 'App_Data\Database.mdf' as database 'Database'

  • Thread starter Thread starter ornit_sagy
  • Start date Start date
O

ornit_sagy

Hello,
I'm trying to connect to Database.mdf from an asp.net file and I get
the following error message:
Could not attach file 'App_Data\Database.mdf' as database
'Database'.
CREATE DATABASE permission denied in database 'master'
The connection string I use is:

Provider=SQLNCLI;Server=localhost\SQLExpress;AttachDbFilename=App_Data\Database.mdf;Database=Database;Trusted_Connection=Yes
Thanks!!!
Ornit
 
Back
Top