I am trying to connect to a security database to get the logged on user's rights in my code. However, when I am debugging in the immediate window I get the following error which says could not connect to the database. Where is the problem. The web.config file contains the database connection string.
{Security.SecurityCtl}
AllowDataCache: True
Container: Nothing
DatabaseConnection: "Password=****;Persist Security Info=True;User ID=****;Initial Catalog=DB;Data Source=****"
EncryptionKey: ****
LastErrorMessage: "Cannot open database requested in login 'DB'. Login fails.
Login failed for user '****'."
ObjectCollection: {Security.ObjectTypes}
Password: ""
ProjectIdentity: 1
Site: Nothing
UserId: 0
Username: "XYZ"
UserRights: {Security.UserRights}
**** means there is some value that I have removed
{Security.SecurityCtl}
AllowDataCache: True
Container: Nothing
DatabaseConnection: "Password=****;Persist Security Info=True;User ID=****;Initial Catalog=DB;Data Source=****"
EncryptionKey: ****
LastErrorMessage: "Cannot open database requested in login 'DB'. Login fails.
Login failed for user '****'."
ObjectCollection: {Security.ObjectTypes}
Password: ""
ProjectIdentity: 1
Site: Nothing
UserId: 0
Username: "XYZ"
UserRights: {Security.UserRights}
**** means there is some value that I have removed