RE: Application page reference to System.DirectoryServices causes erro

Tech-Archive recommends: Speed Up your PC by fixing your registry



Please ignore previous post - I have managed to get this sorted out.

"arduk" wrote:

I am creating an application page for MOSS that allows users to search the
Global Catalog.

I have added a reference to System.DirectoryServices to my Visual studio
project

If I add the following statement:
using System.DirectoryServices;

The project still compiles OK, but when I go to the application page, I get
the error below. Can anyone assist me with what I am doing wrong here, and
how to troubleshoot it?

Thanks in advance for any assistance

Error received:
File Not Found. at System.Reflection.Assembly._nLoad(AssemblyName
fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at System.Web.Configuration.CompilationSection.LoadAssembly(String
assemblyName, Boolean throwOnFail)
at System.Web.UI.TemplateParser.LoadAssembly(String assemblyName, Boolean
throwOnFail)
at System.Web.UI.TemplateParser.AddAssemblyDependency(String
assemblyName, Boolean addDependentAssemblies)
at System.Web.UI.TemplateParser.ProcessDirective(String directiveName,
IDictionary directive)
at System.Web.UI.BaseTemplateParser.ProcessDirective(String
directiveName, IDictionary directive)
at System.Web.UI.TemplateControlParser.ProcessDirective(String
directiveName, IDictionary directive)
at System.Web.UI.PageParser.ProcessDirective(String directiveName,
IDictionary directive)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding
fileEncoding)
.



Relevant Pages

  • Trying to run in partial trust (getting a PolicyException)
    ... PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, ... PermissionSet& denied, Int32& securitySpecialFlags, Boolean ... Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean ... vdir, VirtualPath virtualDir, Boolean ignoreErrors) +429 ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Errors
    ... Could not load file or assembly 'RSDM' or one of its dependencies. ... stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0 ... Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& ... vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175 ...
    (microsoft.public.dotnet.languages.vb)
  • Could not load file or assembly Microsoft.Rtc.Collaboration
    ... Could not load file or assembly ... Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, ... Boolean throwOnFileNotFound, Boolean forIntrospection) +0 ... System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) ...
    (microsoft.public.exchange.development)
  • Modify the properties of an existing document ::Nonexistent file or folder, or refer to a valid file
    ... Exception Details: System.Security.Policy.PolicyException: Required ... PermissionSet reqdPset, PermissionSet optPset, PermissionSet ... PermissionSet& denied, Int32& securitySpecialFlags, Boolean ... codeBase, Evidence assemblySecurity, Assembly locationHint, ...
    (microsoft.public.sharepoint.windowsservices)
  • Modify the properties of an existing document ::Nonexistent file or folder, or refer to a valid file
    ... Exception Details: System.Security.Policy.PolicyException: Required ... PermissionSet reqdPset, PermissionSet optPset, PermissionSet ... PermissionSet& denied, Int32& securitySpecialFlags, Boolean ... codeBase, Evidence assemblySecurity, Assembly locationHint, ...
    (microsoft.public.sharepoint.portalserver)