Compuskills-Jerusalem / mens-capstone-2020

1 stars 0 forks source link

Authorization for Database creation error #60

Closed nossondsimon closed 4 years ago

nossondsimon commented 4 years ago

After completing the steps mentioned in Issue #59 the following error was given after attempting to register a new user: image

After researching the issue I found the following on StackOverflow that seemed to match: https://stackoverflow.com/questions/9509441/an-attempt-to-attach-an-auto-named-database-error/39889249

One of the answers given was to add " User Instance=True" to the connection string in the web.config file.

after researching what this would do: https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/sql-server-express-user-instances I saw that this would allow the user to create the database even when not in admin mode. And that is what turned out to be the problem, another permission issue for creating the database. This could have been solved by running the program as admin the first time around, but I figured the better way would be to add this snippet of code, in order to make it a more fluid possess.