tags:

views:

2482

answers:

8

My ASP.Net web service cannot run because the application pool is unable to start due to the identity crisis it's experiencing.

The user I'm using in the app pool is a domain user, it's a local admin, it's in IIS_WPG, I've given it "act as part of the OS permissions" - nothing. Nada. Fails to start the application pool each time.

Adding the user to IIS_WPG is usually what's missing, but I guess there's something else.

Things I've tried:

  • Adding user to IIS_WPG
  • Adding user to local admin group and adding the "Act as part of the os" right.
  • aspnet_regiis -ga
  • rebooting...
  • Checked password
  • Recreated the app pool and assigning only my application to it

p.s. If I use the Network Service user it all works - it's just my "custom" user that's failing. Logging in (interactively) with this user works.

Edit:

The solution is as described in the accepted answer (adding the "Log on as Service" right to the application pool's identity user).

I'll just add, for future reference, for those encountering the following message when trying to add the "Log on as a service" right to a domain user:

"This setting is not compatible with computers running Windows 2000 Service Pack 1 or earlier...."

Know that this has nothing to do with Windows 2000 and it's just the domain's group policy that's preventing you from assigning this right to the user.

A: 

What's happening is you are likely running your application inside a pool that is running applications using a different version of the .NET framework. Make sure that all your applications inside that pool are running the same version. If those apps must run under a different version than this one, create a new pool and add your app to it.

Wayne Hartman
good idea. I'll check...
Assaf Lavie
Nope, not it. And it actually unlikely to be the cause because the warning in the Event Log about the identity problem occurs way before I even try to view the web page (thereby loading the DLL..)
Assaf Lavie
A: 

I know this is simple, but have you checked the password is correct?

Hooloovoo
yes, and I've reset it and retried. even tried running calc with runas with it.. (which works)
Assaf Lavie
A: 

Try running the following command in the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 folder:

aspnet_regiis -ga <your_app_pool_user>

For more info on configuring a user account to use as an application pool identity see the following article:

How To: Create a Service Account for an ASP.NET 2.0 Application (MSDN)

Kev
the command line did not help.
Assaf Lavie
If you're creating custom accounts for use as app pool identities you should always run that command anyway. It sets up all the correct user rights assignments, registry permissions, NTFS perms etc.
Kev
A: 

Having had this issue before and not being able to track the reason I sympathise! Some pointers that might help:

  • Check the password is correct (sorry has to be said)
  • Use a new app pool in which no other website is running
  • Ensure that you have run aspnet_regiis -ga to set up the required permissions

If all else fails: - Stop the app and delete the app pool - Delete the user - Re-create the user - Run aspnet_regiis -ga - Set up a new app pool running under this user - Run the site under this pool That along with copying and pasting the complex password I was using worked for me!

SiC
I've done all this except delete the user (which is a domain user, and working fine on many other machines, so I'm not about to delete it).
Assaf Lavie
+4  A: 

Have you enabled "Log on as a service" for the account?

Start -> Control Panel -> Administrative Tools -> Local Security Policy -> Local Policies -> User Rights Assignment -> Log on as a service

(make sure your account is in this list directly or indirectly; it has also been suggested that you should set: Access this computer from the network; Deny logon locally; Log on as a batch job)

Also - ensure that the account has "Read & Execute", "List Folder Contents" and "Read" access to the file system that underpins the web site/application.

Marc Gravell
I tried setting Log On as Service, but I'm unable to. The MMC snapin says: "this setting is not compatible with computers runnign Windows 2000 Service Pack 1 or earlier...."Of course, I'm running XP64 with SP3.This is very suspicious. Could it be a wrong error message that's actually due to group policy preventing me from changing this right?
Assaf Lavie
I haven't seen that message; I honestly don't know.
Marc Gravell
http://community.spiceworks.com/topic/29356
Marc Gravell
or maybe http://www.smallbizserver.net/Forums/tabid/53/forumid/11/postid/87909/view/topic/Default.aspx
Marc Gravell
Bingo. Group policy prevented the assignment of this right to my user. The result was the above weird message which is totally unintuitive.
Assaf Lavie
i just ran a windows update and it added my user to "deny log on as batch job". weird :s
Andrew Bullock
+1  A: 

Make sure there's a folder called c:\inetpub\temp\apppools. If not, create it.

Scott Hanselman
Had no such folder. Created one. Still doesn't work (invalid identity). Is there an extra step?
Assaf Lavie
A: 

Do you have a group policy somewehere that is pulling the account out of the iis_wpg group? We have this (or a similar) problem frequently when, for whatever reason, a worker process or a service needs to run under a custom account.

James Conigliaro
No, the account is in WPG.
Assaf Lavie
A: 

I still getting issue.. i created and added window user in to Log on as a service. Also set read and execute permission on directory. Set this user to identity of appPool. But no luck... Can any one have ne solution?