LDAP in medium trust

Posted by eych on Stack Overflow See other posts from Stack Overflow or by eych
Published on 2012-05-31T19:39:47Z Indexed on 2012/06/05 16:40 UTC
Read the original article Hit count: 240

I've have a solution with one website and several projects.
The projects all have the AllowPartiallyTrustedCallers attribute and are strongly-named.

The site works in full trust. However, after set the trust to medium, I get the System.Security.SecurityException: Request failed. error as soon as I browse to the site.

In my projects, I have calls to LogOnUser, as well as many calls to variousSystem.DirectoryServices.AccountManagement methods.

Can this site run with medium trust or do I have to have full trust for all the LDAP calls?

As I mentioned, I've set the AllowPartiallyTrustedCallers attribute on all projects. Not sure what else to do.
Also, I have no idea what/where the error is being generated. The event logs on the server have nothing in regards to this SecurityException. Is there any way to find out what the error location is so maybe I can attempt to rewrite some code?

[running .NET 4.0 on Win2k8R2]

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about interop