Im using asp.net mvc4 using azure sql-database and I have problem with initial database with the following command:
WebSecurity.InitializeDatabaseConnection("AdminDBConnection", "UserProfile", "UserId", "UserName", autoCreateTables: true);
A exception is thrown saying:
CREATE TABLE permission denied in database 'master'.
And this should be easy to solve knowing that sql have the keyword GRANT that will manage permissions but I cant get it to work.
When i entering:
GRANT ALL
ON "object_name"
TO "user_name"
Where object_name is my Database and username the user to whom to give access rights to.
I get the following :
Msg 15151, Level 16, State 1, Line 1
Cannot find the object 'object_name', because it does not exist or you do not have permission.
And my question then is:
Does my sql query not work because i have the wrong 'object_name'?
And if so how can i in vs 12 or in the azure portal or in the Connectionstring see my username and database name, so i can give it access rights.
If 'object_name' is not the problem then my question is:
What is the problem and how do i fix it?
Thanks!