I have two identical Windows 2012 R2 environments. One is for development and the other is for staging.
For my server-side language I am using PHP and the Laravel 4.1 Framework.
I have a service account that I use for both environments to connect to our MSSQL development database. I set the service account to the application pool and assign that application pool to the application within IIS 8.5. I have done this numerous times with no issues. This avoids us storing the password in the PHP database config file within Laravel.
Now, the application I built is running fine in development. I can connect to the database using the method described above. I copied the identical code over to staging, again using the same environment and the same service account, but I get the dreaded:
PDOException SQLSTATE[28000]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
Because it is working in development with no issues and because I have other applications on my staging box that are successfully able to connect, I am at a complete loss as to why this application can't connect in test. I spent hours yesterday troubleshooting with no luck.
Any ideas?