Problems connecting to SQL Server 2012 with App Pool Identity

I am using IIS APPPOOL\icogzimbra to try to connect to SQL Server 2012.  I created a login icogzimbra both on the server and the database, but my connection is failing through the application.  I'm getting an error saying that the login for my APPPOOL is failing.  This is confusing me big time.  Can anyone help? Thanks

  • Is SQL Server on the same machine as your web server?  If not then you won't be able to use the app pool identity to authenticate as it's a local account.  You'll need to either use a domain account or SQL authentication.

    Could you also post the full error message you're getting?

    (N.B. you may need to do an app pool recycle if you change any permission son the SQL server side to ensure the previous authentication failure hasn't been cached)

  • In reply to Alex Crome:

    SQL Server is on the same machine.  I can log in to the database server and access the database with the icogzimbra user id in SQL Server Management Studio just fine.  Here is the entire error message:

    Critical Error: SiteUrls.Config

    Specific Error Message: The type initializer for 'Telligent.Evolution.Components.ApplicationSet' threw an exception. Cannot open database "Zimbra Icog" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\icogzimbra'.

    Please contact your site administrator. An explanation for why this error could occur is below.

    Zimbra Community expects to find a valid XML file containing all of the links for a community. By default, this file is located at the root of the site and is named SiteUrls.config.

    A common error is that SiteUrls.config included unescaped XML characters, such as "&" when defining a querystring.

  • In reply to 6749924:

    You are using Integrated Security, aren't you?
    Good -- never use SQL Authentication as this exposes a serious security threat.
    The problem is with the login you created on SQL Server.

    Try this:
    - start SQL Server Management Studio (SSMS)

    - expand branch Security

    - create a login named "IIS APPPOOL\ICOGZIMBRA"
    Don't select it from the user account selection window, just type in the name as shown above without the quotes.

    - at the left, select tab "User Mapping"
    Select the database that this user account has access to -- just check the selection box at the front.
    SSMS will auto-create the appropriate database user and map it to this login.