2009-10-18

Login failed for user 'IIS APPPOOL\DefaultAppPool'.

If one uses trusted connection to a sqlserver database under Windows 7 and II7 one might get the error message "Login failed for user 'IIS APPPOOL\DefaultAppPool'." when trying to run a web application.  There are several articles for this but all points to a different GUI than mine (earlier versions of Windows7/IIS7?).

Fire up Internet Information Services Manager.  (window-iis-return)

Find the Application Pools item in the Connections toolbar.  One can reuse the default application pool or create a new one.  Go for the latter since it is slightly more complicated and hence more fun.


I don't know what the settings above do but they seem to work.

Select your newly created application pool and the advanced settings.  Change the Process model to LocalSystem.
(I had planned to create a "better" account with the proper limited rights but ran out of time.  Someone else...?)



As one can see in the listing above the new application pool runs as different identity than the default ones.

Now change your web application to use this application pool.  This could be made simpler by moving the menu for this to the same place as the other menus.  To make the story short - select your site and look to the right of the IIS manager.



That is all there is to it.


11 comments:

OhSnapPlaya said...
This comment has been removed by the author.
Unknown said...

Thanks a lot for this solution. It works and saved my day (just upgraded to Windows 7). One day I hope to find out why it works.

Anonymous said...

Thanks a lot man!!!

Anonymous said...

Thank you -

Chorinator said...

Thanks a lot, just what I was looking for. Worked like a charm.

Unknown said...

Thanks a lot.

Unknown said...
This comment has been removed by the author.
Unknown said...

It works, just like that!
Thanks man.

DetroitDave said...

Awesome! It worked just like you said, was simple to follow, and was desperately needed!!! Thanks!

Anonymous said...

Thanks a lot i just upgraded my windows to 7 and i was unable to configure my web page... this solution was very useful.
TY once again

Anonymous said...

Perfect!

It works like a charm zebra with a tooth breath

Thx