I have a website (Alpha) running successfully on an IIS 7.5 webserver running on Windows Server 2008 R2.

I basically want to clone Alpha and have a second website Beta, the same as Alpha, but will have somewhat different code. I've created the second website and also created a second Application pool. As far as I can tell, the two application pools are configured the same: auto start, v4.0, Integrated, Identity: ApplicationPoolIdentity.

The second website (Beta) doesn't work if I connect it to its own Application Pool, but works fine if I connect it to Alpha's Application Pool. As far as I can remember, I did not do anything special to Alpha's Application Pool. As far as I can tell, the advanced settings are the same for both.

The failure Beta has when connected to its own Application Pool is is getting an unhandled exception: Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

Any ideas on how to compare the two Application Pools, or to debug the overall system would be appreciated.

I tried deleting Beta's Application Pool and re-creating it.

link|improve this question

feedback

2 Answers

You changed the account that pool Alpha runs under, but forgot to change pool Beta.

So pool Beta is still running under the default Networkservice (machine account), which doesn't have rights to your database.

link|improve this answer
sounds promising. I'm off on to other projects, but when I return to this project, I will provide an update. – Knox May 22 at 10:25
feedback

You are connecting to a SQL-Server with integrated Security right? It seems the second pool identity does not have access to your SQL-Server/database.

Using ApplicationPoolIdentity, your app is connecting to SQL-Server as something like:

IIS AppPool\AppPoolName

make sure that both Application pool identities have access to your server and the database in question.

I could create a Windows group to put the various Application pool identities in and then give that Windows group access to your database.

Also check this question, which seems to address a similar problem and suggest a reboot of the server.

link|improve this answer
sounds promising. I'm off on to other projects, but when I return to this project, I will provide an update. – Knox May 22 at 10:25
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.