I deployed my asp.net mvc 3 project under IIS 7 (Windows 7). Project contain attach *.mdf DB file in App_Data folder. First I got following error:
Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.
I removed it so change connection string in my web.config file - remove user instanse=true and in Application Pool -> Addvanced Setting -> Process Model -> Load User Profile set value TRUE and then I got next error: CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file C:\inetpub\wwwroot\assign\App_Data\AssignmentDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
my connection string is
<add name="AssignmentDBEntities" connectionString="metadata=res://*/Models.AssignmentDBModel.csdl|res://*/Models.AssignmentDBModel.ssdl|res://*/Models.AssignmentDBModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\AssignmentDB.mdf;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
I don't known how resolve this problem..(( someone can help me?