Code Errors

Hi I wonder If anyone could help me identify this error in the code on line 264. This is the error we get when we attempt to connect to an Intranet we had designed a few years ago by a chap who is no longer with us. I am afraid from a coding point of view i am a real novice

.

Could anyone please help

The server is not operational.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The server is not operational.


Source Error:


Line 262:                  DirectorySearcher mySearcher = new DirectorySearcher(entry);
Line 263:                  mySearcher.Filter = "(&(objectClass=user)(samaccountname=" + currentUserID + "))";
Line 264:                  SearchResult resEnt = mySearcher.FindOne();
Line 265:                  try
Line 266:                  {
 

Source File: c:\dartsIntranet\dartsIntranetV2.1\App_Code\ACR.cs    Line: 264

Stack Trace:


[COMException (0x8007203a): The server is not operational.
]
   System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +377678
   System.DirectoryServices.DirectoryEntry.Bind() +36
   System.DirectoryServices.DirectoryEntry.get_AdsObject() +31
   System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne) +78
   System.DirectoryServices.DirectorySearcher.FindOne() +47
   HudsonNash.AutomaticCrashRecognition.ACR.PullADUser() in c:\dartsIntranet\dartsIntranetV2.1\App_Code\ACR.cs:264
   HudsonNash.AutomaticCrashRecognition.ACR.StoreBug() in c:\dartsIntranet\dartsIntranetV2.1\App_Code\ACR.cs:182
   HudsonNash.AutomaticCrashRecognition.ACR.DoACR() in c:\dartsIntranet\dartsIntranetV2.1\App_Code\ACR.cs:87
   HudsonNash.AutomaticCrashRecognition.ACR..ctor(String e, Page sender) in c:\dartsIntranet\dartsIntranetV2.1\App_Code\ACR.cs:64
   StartPage.PullADUser() in c:\dartsIntranet\dartsIntranetV2.1\StartPage.aspx.cs:999
   StartPage.Page_Load(Object sender, EventArgs e) in c:\dartsIntranet\dartsIntranetV2.1\StartPage.aspx.cs:165
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

 

daly29Asked:
Who is Participating?
 
viralypatelConnect With a Mentor Commented:
It is a permission issue. Change your application pool identity from "Network Service" to a Domain account. Should work here.

Check this discussion for more details:
http://social.msdn.microsoft.com/Forums/en-US/sharepointserverknowledgenetwork/thread/247c566e-3821-43d8-9e26-9a6c8775b9db/
0
 
daly29Author Commented:
Thanks For your reply. did what suggested and just got a white screen. Have reset and get original error using a network service
0
 
viralypatelCommented:
can  you try using a local system account?
0
 
daly29Author Commented:
That is not working either
0
 
daly29Author Commented:
Thanks I thought I had closed this question. Whilst the answer did not directly resolve my issue it was a good pointer so thank you for your time and response
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.