Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

An operations error occurred - using (PrincipalContext pc = new PrincipalContext(ContextType.Domain, "MyDomain"))

$
0
0

Hi

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?

using System.DirectoryServices.AccountManagement;

My application pool is Intergrated, my Anonymous Authentication is enabled and windows authentication is disabled. My asp.net and forms authentication is enabled.


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>