none
SQLEXPRESS not accepting "IIS AppPool/DefaultAppPool" as valid LogIn RRS feed

  • Question

  • Im trying to create a new login on my local instance of Sql Server 2008 Express(SQLEXPRESS) for IIS 7.5 worker process to use for database access to a custom database.

    I type in "IIS AppPool\DefaultAppPool" in the "SELECT USER OR GROUP" dialog then click on "Check name" and it transforms the name to an underlined "DefaultAppPool". Then I click "Ok" and it says "User or Group was not found".  Am I using the right name for an IIS 7.5 worker process account? Please help. Thanks.


    System configuration: Winndows 7 RTM, Gigabyte GA-EP45-UD3L motherboard, Intel Pentium Dual-Core E6300 Wolfdale @ 2.8GHz, 4GB PC-1066 DDR2 Patriot Viper Memory, 500 GB Western Digital Hard Disk, GeForce 8800GT Videocard
    Friday, April 30, 2010 11:13 PM

Answers

All replies

  • Saturday, May 1, 2010 12:10 PM
  • While the link above does provide good information about application pool identities, I'm not sure it leads to an optimal solution (I came away thinking that my best bet was to change my App Pool's Identity to NetworkService).

    I'm running Win7 with SQL Server 2008 R2, and I had an identical or similar experience in SSMS:

    Security -> Logins -> New Login... -> "Search..." -> "IIS APPPOOL\DefaultAppPool" -> "Check Name" - > underlined/recognized "DefaultAppPool" -> "OK" -> "OK"

    and I got a "Windows NT user or group '<machinename>\DefaultAppPool" not found" error.  For me, the problem was SSMS replacing "IIS APPPOOL" with my machine name.  Once I retyped "IIS APPPOOL\DefaultAppPool" into the "Login name:" box, everything worked as expected.

    • Proposed as answer by cvconcrk Thursday, May 26, 2011 2:58 PM
    Thursday, July 15, 2010 8:00 PM
  • Cvconcrk, when you say:

      Once I retyped "IIS APPPOOL\DefaultAppPool" into the "Login name:" box, everything worked as expected.Once I retyped "IIS APPPOOL\DefaultAppPool" into the "Login name:" box, everything worked as expected.

    You typed in this IIS APPPOOL\DefaultAppPool ?   or did you mean you typed in this  IIS APPPOOL\<Name of my DefaultAppPool>

    I have tried many ways but keep getting "CREATE FAILED for LOGIN IIS APPPOOL\ASP.NET v4.0"  when I try to add the login for IIS APPPOOL\ASP.NET v4.0.

    Thanks,

    Dave

    Monday, August 22, 2011 11:23 PM
  • Hi Dave,

    IIS APPPOOL\DefaultAppPool is a built-in Windows user used for IIS, which you can find in the IIS_USRS Windows user groups. However, the ASP.NET v4.0 is a built-in application pool which is also running under DefaultAppPool account, and there is no such IIS APPPOOL\ASP.NET V4.0 built-in account at all. However, you can user another Windows account for it and add this account within SQL Server as a login. For more information, see Specify an Identity for an Application Pool (IIS 7) (http://technet.microsoft.com/en-us/library/cc771170(v=ws.10).aspx).


    Best Regards
    Alex Feng | Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
    Tuesday, August 23, 2011 1:37 AM
    Moderator
  • Remember that if you copy IIS APPPOOL\DefaultAppPool into the Login Name field it dosnt work.

    Delete the space between ISS and APPPOOL and insert a space again, then it will work!!!

    Very intelligent!


    Niels-Jørgen Hvidberg IT consultant

    Tuesday, March 27, 2012 11:38 AM
  • I was developing applications using Visual Studio 2008 on my XP Pro computer. I successfully developed database applications that worked on the VS2008 server. I had a GoDaddy virtual dedicated server. I downloaded Micrsoft SQL Server 2008 R2 Express. The reason for this was that my virtual server was running (x64) and using Server 2008 R2 and IIS 7. I designed a simple program so that I could begin to get my programs to function on the virtual server. Every time I got this error that read "Login failed for user "IIS APPPOOL/DefaultAppPool." I consulted these forums. I read suggestions about adding "IIS AppPool/DefaultAppPool" to the "Logins" section of Server Express. I did this and also checked "Grant" and "Enabled"  under the "Status" section to give permission to connect to the database. I also checked all of the boxes under the "Server Roles" section. I continued to get the same error. I tried keeping my database in my "App Folder" and also installing it under the virtual server and I still got the same error. After many days I decided to create a completely new database by using SQL Server Management Studio and to replace my test code database reference with this new one. The new database worked perfectly. If you are interested in making the same test jump I made I have recreated the code from my Default.aspx.vb file below. I have a simple ASP project with a button (Button1) and a text box (TextBox1). The databse created with SQL Server Management Studio is called "mydatabasename" and the only table in it is called "mytablename" and the only column in the table is called "FirstColumnNameInDatabase".

    Imports System.Data.SqlClient

    Imports System.Data

    Imports System.Configuration

    Partial Class _Default

    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender as Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim cn As New SqlConnection()

    cn.ConnectionString = "DataSource =(local)\SQLEXPRESS; Intial Catalog = mydatabasename; Integrated Security = True"

    cn.Open()

    Dim strSQL as String = "Select * From mytablename"

    Dim mycommand As New SqlCommand(strSQL, cn)

    Dim myDataReader as SqlDataReader

    myDataReader = mycommand.Execute Reader(CommandBehavior.CloseConnection)

    While myDataReader.Read

         Dim mystring as String

         mystring = MyDataReader("FirstColumnNameInDatabase").ToString().Trim()

         TextBox1.Text = TextBox1.Text & mystring

    End While

    myDataReader.Close

    End Sub

    End Class

    I have seen a wide divergence of answers that seem to help people but I think it is because there are so many variables.





    • Edited by AlekPushkin Sunday, December 30, 2012 2:41 AM
    Sunday, December 30, 2012 2:29 AM
  • Hi

    In Windows

    -Create a new user (MySQL_accesss)

    in SQL 

    -open QSL management studio 

    -Right click object explorer / security / login 

    -Select New login.

    -in new windows / general  click to search button (after te login name label)

    -In new (user and grous) windows type the new user name (MySQL_accesss)

    -click check name and OK

    -click Select Page / User Mapping (left side)

    -check  in "User mapped to this login" windows / used database

    -click Select Page / Securables (left side)

    -check in "Permissions for....." windows / connected SQL  sa (if exist default "sa" )

    -Click OK 

    in ISS Manager

    -Open the IIS Management Console (INETMGR.MSC).

    -Open the Application Pools node.

    -Select the DefaultAppPool.

    -Right click and select Advanced Settings...

    -open the Identity.

    -select custom accout and click set.. button  

    -type created user name (MySQL_accesss) and password  and click OK,OK,OK,

    That is all

    Have a nice day

    Tuesday, April 28, 2015 10:43 AM