0
votes

Bit of background, I need to remake this ColdFusion app in C# so I set up the legacy project on my machine and it was working fine till today, when I messed up running SQL commands (I know I should have used transactions, hindsight is fantastic). So I had a backup I made yesterday so I just deleted the DB I had in my SQLExpress and restored the backup and then I encoutnered the error below.

I don't remember making any changes or setting up anything in the permissions for the database so I don't think it something related to that.

I am getting the below error message when trying to login to the CF app that is running on Lucee, on my local machine.

Message Cannot open database "appName" requested by the login. The login failed. ClientConnectionId:555eb338-984e-4edf-a12b-c0662a0f6068 Stacktrace The Error Occurred in C:\lucee\tomcat\webapps\appName\admin_cfcs\login.cfc: line 69 called from C:\lucee\tomcat\webapps\appName\admin\authenticate.cfm: line 26 called from C:\lucee\tomcat\webapps\appName\admin\dashboard\dashboard.cfm: line 2

1
Check the logs on the SQL Server, which will give the true connection error. If you then don't understand that error, post that error in your question as an edit. - Larnu
Found the error in the Logs as suggested I had setup a user, for the database and it wasn't assigned to the database when I restored the new copy, so I just had to add the database "appName" to the User Mapping. Thanks :) - nader2929

1 Answers

3
votes

Got the answer thanks to @Larnu 's suggestion in a comment to the questions.

Found the error in the Logs as suggested I had setup a user, for the database and it wasn't assigned to the database when I restored the new copy, so I just had to add the database "appName" to the User Mapping. Thanks :)