I use a Thread Timer for Background task scheduling in my ASP.NET MVC projects.
In one of those tasks , I connect to active directory for some actions like moving users in OU's and adding and removing security groups.
When I launch my application in VS 2013 on IIS Express , It work fine , But When I host my app on IIS of that machine although it has the exact same credential , I get
IIS Express usually runs through your own user, which is probably an Administrator and has all the necessary roles.
IIS 7.5 runs as a service, therefore, it uses built-in user accounts which probably lacks the permissions you need.
Here's how you change an AppPool identity on IIS 7.5: https://technet.microsoft.com/en-us/library/cc771170(v=ws.10).aspx