I am using SQL Server 2008 R2 Express and the "SQL Server and Windows Authentication" mode in my database. I can open the database using Enterprise Manager, but when I run the aspx application, I get:
Cannot open the PersonnelPro database requested at login. Login failed.
My connection string is web.config:
<add name="dbString" connectionString="Provider=sqloledb;Data Source=AREA51\SQLEXPRESS;Initial Catalog=PersonnelPro;User Id= ****;Password= ****" />`
I searched the Internet and SO, but could not find a solution. Any ideas that might cause this problem?
Update:
Looking into the SQL log files ("C: \ Program Files \ Microsoft SQL Server \ MSSQL10_50.SQLEXPRESS \ MSSQL \ Log"), I find this:
2012-12-21 05:58:00.97 Logon Error: 18456, Severity: 14, State: 38. 2012-12-21 05:58:00.97 Logon Login failed for user 'PersonnelPro'. Reason: Failed to open the explicitly specified database. [CLIENT: <named pipe>]
This web application is owned by a third-party company. So technically, I only need to configure the web.config file, and it should work.
source share