xian orin

xian orin

  • NA
  • 1
  • 1k

Hosting ASP .NET 4.5 applications on WSS 3.0 Error on .NET

Apr 17 2015 4:34 AM
Hi,
I have a custom ASP.NET website and a hosting account on asphostportal.com Which a page that uses system. DirectoryServices namespace. It runs fine standalone, but when integrated with WSS 3 by copying the application into _layouts folder and called from within a link inside a Sharepoint site the page execution breaks on a statement that uses a class from the above mentioned name space. I tried adding a reference to the assembly in the web. config file of the Sharepoint site but that doesn't work. Here is the stack trace:
An operations error occurred.
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.PropertyValueCollection.PopulateList() at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName) at System.DirectoryServices.PropertyCollection.get_Item(String propertyName) at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer() at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit() at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize() at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx() at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate) at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, IdentityType identityType, String identityValue) at System.DirectoryServices.AccountManagement.GroupPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue) at main2.GroupMembers(String groupName, String domainName, String userName) at main2.Page_Load(Object sender, EventArgs e)