Error creating database


I’m receiving an error when trying to install GRA v4.0.0-beta2, and I’m sure it’s just some settings I have wrong. When loading up the setup through http://localhost/ I get a generic error that “An error occurred while starting the application.” When I go into the log, it says “System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in database ‘master’.”

I’m using the srp_owner user that was created in an earlier step. Any idea what I’m missing? I’m on SQL Server 2012 Express if that makes any difference.



It seems like maybe the database doesn’t exist or you don’t have a database specified in the connection string.

Did you create the database prior to running the site the first time? The software can create the tables that are necessary but the database must exist first and be specified in the connection string for it to create the tables.


Yes, I created a database named SRP and listed SRP as the database name in the connection string.


It’s really weird that the software would be trying to run a “CREATE DATABASE” if the database already exists and the user is successfully connecting to it. Here are some other things to check:

  1. Does the user specified in the connection string have db_owner privileges on that database?
  2. Can you connect to that database using SQL Server Management Studio using the user/password you have configured in the appsettings.json?
  3. Does the password have special characters in it? For the appsettings.json file some characters (double quotes and backslashes for sure) need to be escaped - you should use \" or \\ to represent those characters if they are present in your password. You can use a tool like this Free Online JSON Escape/Unescape to check.

  1. In the Security folder, under Logins, that user is listed as db_owner and public in the User Mapping for SRP. If I look at the properties for that user in Security>Users in the SRP database, I see db_owner in the Membership page.
  2. I’m able to connect to the SQL server with my db_owner user, but when I try to look at the properties for SRP, it says I do not have permission to perform this action.
  3. I did, but don’t now. I removed all special characters from the passwords since this wasn’t allowing me to connect at all.


OK, I got to the GRA page! I took this line out: Trusted_Connection=True;


D’oh! Thanks so much for pointing this out. I will update the documentation to reflect that as well as the json file character escaping!!


Thanks so much for your help!