Last post Jun 10, 2017 11:50 PM by fiazahmed
Jun 09, 2017 11:07 AM|fiazahmed|LINK
i created website with asp.net mvc 5 with entityframework code first approach.all works fine on local host.
the connection string on local host is :
<add name="DefaultConnection" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\fiazranjha.mdf;Initial Catalog=fiazranjha.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />
i uploaded the site to hosting server with this database in App_data folder i want to connect this database which is already created.
but on hosting as asked by hosting company i created user and used mssqlserver2016 here is my connection string
connectionString="Data Source=.\MSSQLSERVER2016;AttachDbFilename=|DataDirectory|\fiazranjha.mdf; Initial Catalog=fiazranjha.mdf;Integrated Security=True;User Id=myusername;Password=mypassword;" />
i am very thankful for help .if i create new database and then connect the same error occur. therefore
any workarround to use existing database.
fiaz ahmed ranjha
Jun 09, 2017 12:46 PM|kaushalparik27|LINK
Provide DBCreator or DBOwner permission to user that you have created in SQL Server. Here is the detail on the solution:
"CREATE DATABASE permission denied" error when trying to create a database
Jun 09, 2017 03:21 PM|fiazahmed|LINK
thanks for help,
this cpanel use mylittleadmin for databases in which i could not set the fiazranjha server roles.
sir standard user sa with password 123456 is system user i tried to use these credential to connect the same error occur,
sir i am doubt about the connection string .please verify it.
any way to workarround ?
the database is already in App_Data folder can we connect to that without creating new one.
very very thanks for help
fiaz ahmed ranjah
Jun 10, 2017 11:50 PM|fiazahmed|LINK
thanks all ,
my hosting provider assigned rights and the problem solved. there was issue with user rights .