Last post Jul 08, 2015 09:32 PM by Nan Yu
Jul 08, 2015 01:01 AM|sunettew1|LINK
I have code that works great in Visual Studio but as soon as I publish to IIS, it gives me an error stating: An operations error occurred.
If I comment out:
UserPrincipal usr = UserPrincipal.FindByIdentity(pc, IdentityType.SamAccountName, LogonParams.UserName);
and all it's related code, it works. But as soon as I do the findbyIdentity it fails. How do I get this to work on the iis server?
My application pool is Intergrated, my Anonymous Authentication is enabled and windows authentication is disabled. My asp.net and forms authentication is enabled.
Jul 08, 2015 09:32 PM|Nan Yu|LINK
By default, the current thread running under the application pool indentify(Network service by default). If you connect to Domain or ApplicationDirectory, the machine account will be used. If this is your scenario, the issue may cause by the machine account
do not have sufficient permissions. You can try either adjust the account the application pool running under or enable impersonation.
Below are two articles about the related configuration, hope helps
Configuring Application Pool Identity with IIS 6.0 (IIS 6.0)
You could also refer links below for similar cases which have provided solutions :