I have a very annoying problem on my Windows 2008 R2 server. Each time it's restarted, either planned or unplanned, one specific site is not able to connect to the database server, a MSSQL Server 2008 R2 Express instance on the same machine. It will give the following error:
Cannot open database "SiteDb" requested by the login. The login failed.
Login failed for user 'SiteDbUser'.
This error will continue, until I manually recycle the application pool for this specific site - a simple website restart doesn't seem to do the trick. As soon as I recycle the app pool, the site connects just fine and will continue to do so until the next reboot. Now, the strange thing is that I have other sites running on this webserver, which doesn't seem to suffer from this problem - they will connect just fine after a reboot. All my websites have different MSSQL users, but I have compared the ones working with the one not working, and I can't seem to find any differences. I have also tried creating a new user for the problematic website, but that doesn't seem to make no difference. I have tried specifying both the instance name and "127.0.0.1" in the connection string, and both work for the other sites, but none of them makes a difference for the problematic site.
I have tried a few other things as well, but since I have to reboot the server to test it (or at least so it seems?), testing this is a bit "expensive", because the server is running sites with quite a bit of daily visitors which matters for my business.
Have any of you guys experienced something like this? I will appreciate any ideas :)